Synchronize Python instance to its binding C++ object instance. If the program is modified in C++ space, this method should be invoked. Notes: This is a very low level API. Users should not invoke it directly. Returns: None
(self)
| 7325 | self.current_block_idx = self.current_block().parent_idx |
| 7326 | |
| 7327 | def _sync_with_cpp(self): |
| 7328 | """ |
| 7329 | Synchronize Python instance to its binding C++ object instance. |
| 7330 | If the program is modified in C++ space, this method should be invoked. |
| 7331 | |
| 7332 | Notes: This is a very low level API. Users should not invoke it |
| 7333 | directly. |
| 7334 | |
| 7335 | Returns: |
| 7336 | None |
| 7337 | """ |
| 7338 | for block_idx in range(len(self.blocks), self.desc.num_blocks()): |
| 7339 | self.blocks.append(Block(self, block_idx)) |
| 7340 | for block in self.blocks: |
| 7341 | block._sync_with_cpp() |
| 7342 | |
| 7343 | def _copy_param_info_from(self, other): |
| 7344 | """ |