MCPcopy Create free account
hub / github.com/alibaba/GraphScope / align_pred_cache

Method align_pred_cache

python/graphscope/nx/classes/cache.py:155–169  ·  view source on GitHub ↗

Check and align the pred neighbor cache with node id cache

(self)

Source from the content-addressed store, hash-verified

153 return self.succ_attr_align
154
155 def align_pred_cache(self):
156 """Check and align the pred neighbor cache with node id cache"""
157 if self.enable_iter_cache and self.pred_align is False:
158 if self.futures["pred"] is None:
159 self._async_fetch_pred_cache(self.iter_pre_gid)
160 start_gid, self.pred_cache = self.futures["pred"].result()
161 if start_gid == self.iter_pre_gid:
162 if self.iter_gid != self.iter_pre_gid:
163 self._async_fetch_pred_cache(self.iter_gid)
164 self.pred_align = True
165 else:
166 print("pred not align", start_gid, self.iter_pre_gid)
167 self._async_fetch_pred_cache(self.iter_pre_gid)
168
169 return self.pred_align
170
171 def align_pred_attr_cache(self):
172 """Check and align the pred neighbor attr cache with node id cache"""

Callers 1

align_neighbor_cacheMethod · 0.95

Calls 1

Tested by

no test coverage detected