Skip to content
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

Fix PythonJob need aiida_workgraph on remote computer #396

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Jan 28, 2025

In the decorated function of PythonJob, we attached the WorkGraph's Task class to the function, this will be pickled together with the function, thus, when unpickling the function on the remote computer, it require aiida-workgraph.

Thsi PR deletes the workgraph related attributes of the decorated func if exist.

@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.23%. Comparing base (34e32bd) to head (f5fa186).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #396      +/-   ##
==========================================
- Coverage   92.25%   92.23%   -0.02%     
==========================================
  Files          67       67              
  Lines        4738     4741       +3     
==========================================
+ Hits         4371     4373       +2     
- Misses        367      368       +1     
Flag Coverage Δ
python-3.11 92.19% <100.00%> (-0.02%) ⬇️
python-3.12 92.19% <100.00%> (-0.02%) ⬇️
python-3.9 92.23% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mikibonacci mikibonacci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @superstar54 , I tested it and it works, LGTM! Thanks a lot for the fix!

@superstar54 superstar54 merged commit 9febac0 into main Jan 28, 2025
15 checks passed
@superstar54 superstar54 deleted the fix_pythonjob branch January 28, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants