-
Notifications
You must be signed in to change notification settings - Fork 2
Cache ignores variable reassignment between processes #50
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingcacheRelates to variable hashing during syncRelates to variable hashing during syncjavascriptRelates to JavaScript or Node.js codeRelates to JavaScript or Node.js codepipesRelates to interprocess streamingRelates to interprocess streamingpythonRelates to Python codeRelates to Python codeshared memoryRelates to interprocess memory mappingRelates to interprocess memory mapping
Milestone
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcacheRelates to variable hashing during syncRelates to variable hashing during syncjavascriptRelates to JavaScript or Node.js codeRelates to JavaScript or Node.js codepipesRelates to interprocess streamingRelates to interprocess streamingpythonRelates to Python codeRelates to Python codeshared memoryRelates to interprocess memory mappingRelates to interprocess memory mapping
When a value is synced in either direction, Bifrost caches it by key and value, using xxhash. This combination will subsequently not be transmitted between the processes again; this is to save on redundant shared memory operations which have previously been significant, especially in Notebook environments (where we sync all variables in top-level scope by default when using
%%nodecell magic).However, if a previously-cached variable is changed, that change in value will not reliably translate across processes. This is especially true when reassigning a variable to a value it has previously held, such as when a variable
vchanges from valuextoyand back tox; thev:xmapping, being previously cached, will be ignored by Bifrost, leavingvequal toydespite the user's intentions (see linked issue which follows). Further existing example code for reproductions and potential solutions for the issue can be made quickly available to the assignee as desired.Relevant issues:
Relevant files:
bifrost/py_storage.pybifrost/main.jsSuggested solutions: