MCPcopy Create free account
hub / github.com/alibaba/graph-learn / write_meta

Function write_meta

graphlearn/python/tests/utils.py:45–54  ·  view source on GitHub ↗
(f, schema)

Source from the content-addressed store, hash-verified

43
44def gen_node_data(id_type, id_range, schema, mask=""):
45 def write_meta(f, schema):
46 meta = 'id:int64'
47 if WEIGHTED in schema:
48 meta += '\tweight:float'
49 if LABELED in schema:
50 meta += '\tlabel:int64'
51 if ATTRIBUTED in schema:
52 meta += '\tfeature:string'
53 meta += '\n'
54 f.write(meta)
55
56 def write_data(f, value, schema):
57 line = '%d' % value

Callers 8

gen_userMethod · 0.85
gen_itemMethod · 0.85
gen_edgeMethod · 0.85
gen_node_dataFunction · 0.85
gen_edge_dataFunction · 0.85
gen_entity_nodeFunction · 0.85
gen_relation_edgeFunction · 0.85
gen_cond_nodeFunction · 0.85

Calls

no outgoing calls

Tested by 3

gen_userMethod · 0.68
gen_itemMethod · 0.68
gen_edgeMethod · 0.68