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

make the Project class pickleable #73

Open
alexhroom opened this issue Sep 3, 2024 · 1 comment
Open

make the Project class pickleable #73

alexhroom opened this issue Sep 3, 2024 · 1 comment
Assignees

Comments

@alexhroom
Copy link
Collaborator

alexhroom commented Sep 3, 2024

It would be useful to pickle the Project class, in particular for use of a ProcessPoolExecutor for asynchronously running RAT. However, this is tricky:

  • when attempting to use pickle, the ClassList class is not pickleable
    • this can be solved using the dill library which provides pickling for a wider range of objects
  • however with both pickle and dill, the input types for RAT_main are not pickleable. In general, it seems that pybind-generated classes cannot be pickled.

To pickle Project, we need to find a way of pickling the input types for RAT_main and then the whole class can be pickled via dill.

@alexhroom
Copy link
Collaborator Author

new possible method: just write a pickle function which converts to json and pickles, & the reverses for unpickling

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

No branches or pull requests

2 participants