graphistry / pygraphistry

PyGraphistry is a Python library to quickly load, shape, embed, and explore big graphs with the GPU-accelerated Graphistry visual graph analyzer
BSD 3-Clause "New" or "Revised" License
2.14k stars 205 forks source link

[BUG] as_files consistency checking #202

Open lmeyerov opened 3 years ago

lmeyerov commented 3 years ago

When using as_files=True:

lmeyerov commented 3 years ago

Additional scenario:

edges = pd.DataFrame({'s': ['a'], 'd': ['b']})
nodes = pd.DataFrame({'n': ['a', 'b']}
graphistry.nodes(nodes, 'n').edges(edges, 's', 'd').plot())
graphistry.nodes(nodes.rename(columns={'n': 'n2'}), 'n2').edges(edges, 's', 'd').plot()

=>

422 Client Error:  for url: http://nginx/api/v2/upload/datasets/***/nodes/arrow
{"data":{"bindings":{"node":"n2","node_title":"n2"},"dataset_id":"***","error_message":"Node binding 'node' to a column named 'n2' that does not exist, is there a typo in the column name?"},"message":"Invalid nodes bindings","success":false}

Switching the last line to disable memoization makes it work:

graphistry.nodes(nodes.rename(columns={'n': 'n2'}), 'n2').edges(edges, 's', 'd').plot(memoize=False)