MCPcopy Index your code
hub / github.com/dask/dask / get_all_external_keys

Method get_all_external_keys

dask/highlevelgraph.py:580–601  ·  view source on GitHub ↗

Get all output keys of all layers This will in most cases _not_ materialize any layers, which makes it a relative cheap operation. Returns ------- keys: set A set of all external keys

(self)

Source from the content-addressed store, hash-verified

578 return self.to_dict().keys()
579
580 def get_all_external_keys(self) -> set[Key]:
581 """Get all output keys of all layers
582
583 This will in most cases _not_ materialize any layers, which makes
584 it a relative cheap operation.
585
586 Returns
587 -------
588 keys: set
589 A set of all external keys
590 """
591 try:
592 return self._all_external_keys
593 except AttributeError:
594 keys: set = set()
595 for layer in self.layers.values():
596 # Note: don't use `keys |= ...`, because the RHS is a
597 # collections.abc.Set rather than a real set, and this will
598 # cause a whole new set to be constructed.
599 keys.update(layer.get_output_keys())
600 self._all_external_keys = keys
601 return keys
602
603 def items(self) -> ItemsView[Key, Any]:
604 return self.to_dict().items()

Callers 3

cullMethod · 0.95
_repr_html_Method · 0.95
_bind_oneFunction · 0.80

Calls 3

setClass · 0.85
valuesMethod · 0.45
get_output_keysMethod · 0.45

Tested by

no test coverage detected