Cleanup after instance cache rework.#6209
Conversation
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
|
CI MESSAGE: [43973595]: BUILD STARTED |
Greptile OverviewGreptile SummaryThis PR addresses code cleanup issues identified in the review of PR #6206, focusing on proper resource management and documentation improvements. Key changes:
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: da3b5bb |
| def __del__(self): | ||
| self._return_op_to_cache() | ||
| if hasattr(self._operator, "_cache"): | ||
| self._return_op_to_cache = weakref.finalize(self, self._return_op_to_cache_impl) |
There was a problem hiding this comment.
passing self._return_op_to_cache_impl creates a circular reference - the bound method holds a reference to self, preventing the finalizer from running. need to extract the cache, keyname, and operator instance before creating the finalizer, then pass them as separate arguments to a lambda or standalone function (see how pipeline.py:992 uses lambda with separate args)
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
|
CI MESSAGE: [43975029]: BUILD STARTED |
| @classmethod | ||
| def _process_params(cls, backend, op_device, batch_size, *raw_args, **raw_kwargs): | ||
| """ | ||
| Processes run-time parameters passed to the operator to ones that can be consumed DALI |
There was a problem hiding this comment.
typo: 'parmaeters' should be 'parameters'
| Processes run-time parameters passed to the operator to ones that can be consumed DALI | |
| Processes run-time parameters passed to the operator to ones that can be consumed DALI |
|
CI MESSAGE: [43976464]: BUILD STARTED |
|
CI MESSAGE: [43973595]: BUILD PASSED |
|
CI MESSAGE: [43976464]: BUILD FAILED |
|
CI MESSAGE: [43976464]: BUILD PASSED |
Category:
Refactoring (Redesign of existing code that doesn't affect functionality)
Description:
This PR addresses low priority issues found in #6206 review.
Additional information:
Affected modules and functionalities:
Invocation
Key points relevant for the review:
weakref.finalizeusageTests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A