-
Notifications
You must be signed in to change notification settings - Fork 187
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 Constraint checkpointing #3105
Conversation
To build a new Python Constraint object from a core Constraint object, a Cython PObjectId object is passed as a named argument "oid" to the Python Constraint __init__() method. All Constraint classes must provide an __init__(**kwargs) method without any positional argument for this to work. This fixes the issues with checkpointing and visualization of constraints not based on shapes.
Python Constraint classes deriving from _Interpolated interface with core classes which serialize a boost::multi_array<int, 3> member as a std::vector<int> object, which cannot be deserialized as an Utils::Vector3i. This fixes the issue with checkpointing of constraints based on interpolation.
Codecov Report
@@ Coverage Diff @@
## python #3105 +/- ##
=======================================
+ Coverage 83% 84% +<1%
=======================================
Files 530 530
Lines 26141 26142 +1
=======================================
+ Hits 21954 21967 +13
+ Misses 4187 4175 -12
Continue to review full report at Codecov.
|
@fweik I'm not sure how to interpret the ASAN error espresso/src/script_interface/constraints/fields.hpp Lines 144 to 150 in e2e7c5d
When adding a printf to show
This issue didn't show up before because |
Fixes the ASAN error stack-use-after-scope.
The two ASAN errors |
Nevermind, the cryptic error message fixed by D44404 pops up everywhere when running the core unit tests of the python branch with our outdated Clang compiler. We can safely ignore it. |
bors r=RudolfWeeber |
3105: Fix Constraint checkpointing r=RudolfWeeber a=jngrad Fixes #2943 Enable checkpointing of all `Constraint` classes which are not based on shapes. This also solves the iterator issue in #2943. API change: it is now required to instantiate all `Constraint` classes with named arguments instead of positional arguments. 3109: Use directed acyclic graphs in gitlab CI r=jngrad a=RudolfWeeber Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de> Co-authored-by: Rudolf Weeber <weeber@icp.uni-stuttgart.de>
Build succeeded |
Fixes #2943
Enable checkpointing of all
Constraint
classes which are not based on shapes. This also solves the iterator issue in #2943.API change: it is now required to instantiate all
Constraint
classes with named arguments instead of positional arguments.