Skip to content

Support pickleability of classes with callable args #728

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

Merged
merged 7 commits into from
Jun 10, 2025

Conversation

euxhenh
Copy link
Contributor

@euxhenh euxhenh commented Jun 6, 2025

What does this PR do?

  • adapt_class_type: Replaced the locally defined partial_instance wrapper function with a functools.partial call to construct class instantiators, ensuring they are compatible with pickle and other serialization libraries.

See discussion in #727 for more context.

Before submitting

  • Did you read the contributing guideline?
  • [n/a] Did you update the documentation? (readme and public docstrings)
  • Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

Copy link
Member

@mauvilsa mauvilsa left a comment

Choose a reason for hiding this comment

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

Thank you, looks good! Just do a small fix in the changelog.

euxhenh and others added 3 commits June 9, 2025 09:51
Co-authored-by: Mauricio Villegas <5780272+mauvilsa@users.noreply.github.com>
@euxhenh
Copy link
Contributor Author

euxhenh commented Jun 9, 2025

@mauvilsa Thank you! I updated the changelog.

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b111f10) to head (88e454c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #728   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         6859      6857    -2     
=========================================
- Hits          6859      6857    -2     

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

@mauvilsa mauvilsa merged commit 6ad1dd6 into omni-us:main Jun 10, 2025
27 checks passed
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