dmlc / dgl

Python package built to ease deep learning on graph, on top of existing DL frameworks.
http://dgl.ai
Apache License 2.0
13.36k stars 3k forks source link

[GraphBolt] Cache policy replace fix. #7520

Closed mfbalin closed 2 months ago

mfbalin commented 2 months ago

Description

Replace looks up a key with Read. Read marks the key as in use after lookup if it exists. Insert didn't mark the keys in use.

Until after the keys have actually been inserted into the feature cache (not policy), we actually need to mark them in use. Thus, changing the default value of the reference count to 1 fixes Insert not marking the keys as in use. After that, we need to unmark them as not in use after the embeddings are inserted into the inmemory feature embedding cache.

Checklist

Please feel free to remove inapplicable items for your PR.

Changes

dgl-bot commented 2 months ago

To trigger regression tests:

dgl-bot commented 2 months ago

Commit ID: 98658d786afa112673236b5e46e3917622d07667

Build ID: 1

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link