ustore icon indicating copy to clipboard operation
ustore copied to clipboard

Feature: `None` for `edge_ids` argument for extended `add_edges_from` implementation

Open alexbarev opened this issue 2 years ago • 3 comments

Describe what you are looking for

AFAIK add_edges_from provide 2 interfaces.

First here It requires source_ids, target_ids, and optionally edge_ids that could be set as None explicitly graph.add_edges_from([1, 2, 3], [2, 3, 4], None).

Second here But here, if I try to omit third positional argument or pass None, the exception ValueError: Edge Ids Must Be Sequence occurs.

Example:

import ukv.umem as ukv

db = ukv.DataBase()
graph = db.main.graph

# works fine
graph.add_edges_from([1, 2, 3], [2, 3, 4], None)

# ValueError: Edge Ids Must Be Sequence
graph.add_edges_from([1, 2, 3], [2, 3, 4], None, weight=2)

Could you add support for None for latter interface, because it could be redundant for client to generate and maintain edges_ids.

Can you contribute to the implementation?

  • [ ] I can contribute

Is your feature request specific to a certain interface?

Official Python bindings

Contact Details

No response

Is there an existing issue for this?

  • [x] I have searched the existing issues

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

alexbarev avatar Mar 28 '23 12:03 alexbarev

@davvard, what's the status on this one?

ashvardanian avatar Apr 07 '23 03:04 ashvardanian

I'm waiting for edge ids generation in UKV cpp graph interface.

davvard avatar Apr 07 '23 07:04 davvard

https://github.com/unum-cloud/ustore/issues/398

davvard avatar Jul 25 '23 09:07 davvard