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

Using a pickled function object #12

Merged
merged 2 commits into from
Dec 14, 2024
Merged

Using a pickled function object #12

merged 2 commits into from
Dec 14, 2024

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Dec 14, 2024

PythonJob supports two modes of running the function on the remote machine:

  • Using a pickled function object (default)
  • Using raw Python source code

Use try-except blocks around each operation in the script.py that might fail, and record the error in a file, and the parser can process. In particular, we want to capture:

  • Failed to import cloudpickle.
  • Failed to unpickle the inputs.
  • Failed to unpickle the function.
  • The function execution itself fails.
  • Failed to pickle the results.

@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2024

Codecov Report

Attention: Patch coverage is 80.61224% with 19 lines in your changes missing coverage. Please review.

Project coverage is 88.39%. Comparing base (1cfe56f) to head (429b482).

Files with missing lines Patch % Lines
src/aiida_pythonjob/parsers/pythonjob.py 66.66% 7 Missing ⚠️
src/aiida_pythonjob/calculations/pythonjob.py 87.75% 6 Missing ⚠️
src/aiida_pythonjob/calculations/utils.py 66.66% 4 Missing ⚠️
src/aiida_pythonjob/launch.py 66.66% 1 Missing ⚠️
src/aiida_pythonjob/utils.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
- Coverage   90.09%   88.39%   -1.70%     
==========================================
  Files          13       14       +1     
  Lines         535      586      +51     
==========================================
+ Hits          482      518      +36     
- Misses         53       68      +15     

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

@superstar54 superstar54 merged commit 5699d67 into main Dec 14, 2024
4 checks passed
@superstar54 superstar54 deleted the use_pickled_function branch December 14, 2024 18:50
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.

2 participants