MCPcopy
hub / github.com/google-deepmind/graph_nets / _validate_graph

Function _validate_graph

graph_nets/blocks.py:52–59  ·  view source on GitHub ↗
(graph, mandatory_fields, additional_message=None)

Source from the content-addressed store, hash-verified

50
51
52def _validate_graph(graph, mandatory_fields, additional_message=None):
53 for field in mandatory_fields:
54 if getattr(graph, field) is None:
55 message = "`{}` field cannot be None".format(field)
56 if additional_message:
57 message += " " + format(additional_message)
58 message += "."
59 raise ValueError(message)
60
61
62def _validate_broadcasted_graph(graph, from_field, to_field):

Callers 7

_buildMethod · 0.85
_buildMethod · 0.85
_buildMethod · 0.85
_buildMethod · 0.85
_buildMethod · 0.85
_buildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected