技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
graph-data【数据与研究】Create, validate, batch, slice, and convert Graph Nets graph data with GraphsTuple, data dictionaries, NumPy arrays, and NetworkX graphs.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task needs to build or inspect Graph Nets data before it reaches TensorFlow or Sonnet modules. It covers graphs.GraphsTuple, per-graph data dictionaries, NumPy arrays, NetworkX conversion, batching, unbatching, and slicing.
None combinations, batch offsets, data dictionary rules, and NetworkX feature conventions.GraphsTuple directly when arrays are already in batched form. Provide all seven fields: nodes, edges, receivers, senders, globals, n_node, and n_edge; keep n_node and n_edge non-None.utils_np.data_dicts_to_graphs_tuple, and make every dictionary have the same non-None field set.utils_np.networkx_to_data_dict for one graph or utils_np.networkxs_to_graphs_tuple for a batch; enforce ordered integer node keys and the "features" attribute convention.utils_np.graphs_tuple_to_data_dicts, utils_np.graphs_tuple_to_networkxs, or utils_np.get_graph.GraphsTuple.replace or GraphsTuple.map for structural-preserving field updates; invalid None combinations still raise immediately.tf.Session handling, and utils_tf workflows belong to tensorflow-ops.receivers and senders are both present or both absent; featureless edges still need endpoints.n_node and n_edge are present for manually constructed GraphsTuple objects and for featureless/empty data dictionaries that cannot infer counts from arrays.None key sets, including number fields if any dictionary provides them.networkx.OrderedMultiDiGraph or another compatible networkx<3 graph class accepted by the conversion path.