-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a short version of the workgraph data for the connectivity analysis #291
Conversation
This avoid deepcopy the input data of the tasks
9df798f
to
4aef50d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #291 +/- ##
==========================================
+ Coverage 75.75% 79.81% +4.06%
==========================================
Files 70 65 -5
Lines 4615 4925 +310
==========================================
+ Hits 3496 3931 +435
+ Misses 1119 994 -125
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks fixes it for me.
aiida_workgraph/utils/analysis.py
Outdated
@@ -294,6 +291,9 @@ def check_diff( | |||
from node_graph.analysis import DifferenceAnalysis | |||
|
|||
wg1 = self.get_wgdata_from_db(restart_process) | |||
# also make a alias for nodes | |||
wg1["nodes"] = wg1["tasks"] | |||
self.wgdata["nodes"] = self.wgdata["tasks"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you not pop the item here as in the code changes below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Keeping both tasks
and nodes
will not raise an error in DifferenceAnalysis
. But for consistency, I changed it to be the same as the code below.
@superstar54 you are too quick :D was about to report that I had the same error today, and this also fixes it for me! |
When analyzing the connectivity of the graph, The actual input data of the tasks is not needed. Therefore, the
ConnectivityAnalysis
class fromnode_graph
tries to deepcopy to create a short version. However, it raised an error when deepcoping of the orm.computer, as reported in #290 .In principle, we can fix this inConnectivityAnalysis
innode_graph
, but we can also fix it in workgraph. This PR tries to create the short version data before passing toConnectivityAnalysis
, and avoids deepcopy the data of the tasks but only picks the info that is needed.This is fixed in the
node-graph
package, and this PR bumpednode-graph
to the latest version.