Repository navigation
Conversation
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
|
✅ DCO Check Passed Thanks @Shizoqua, all your commits are properly signed off. 🎉 |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
…eply.github.com> I, Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 5af8bbc Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
Each of the seven cleanup logging guards added in this branch had a
literal backslash-n between the if statement and its body instead of
an actual line break, for example:
if _log is not None:\n _log.info("API runtime cleaned up")
This is a syntax error, so none of the seven modules could be
imported, which is why the added regression tests could not exercise
the guarded lines and codecov reported them as uncovered. Splitting
each into a real if block on two lines fixes the import and lets the
existing tests in tests/test_vlm_engine_cleanup.py run and pass.
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
|
@dolfim-ibm fixed a typo in the guard lines that was breaking the import, tests actually run and pass now. |
…o fix/vlm-cleanup-logging Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
AI triage (advisory)Checked commit This pull request prevents errors during interpreter shutdown by checking if the module logger is available before logging. It adds guards to VLM engines and includes unit tests for the cleanup paths. Topic labels added: CI safety: no concern found. A maintainer must still approve CI. 1 related pull request(s) in the same code
The |
|
The A cleaner fix is to replace Sketch for import weakref
# in __init__, after self.engine is created:
self._finalizer = weakref.finalize(self, _cleanup_engine, self.engine)
# module level, must not capture self or the model is never collected
def _cleanup_engine(engine: BaseVlmEngine) -> None:
try:
engine.cleanup()
except Exception as e:
_log.warning(f"Error cleaning up engine: {e}")Then drop It also makes the test simpler and closer to the real failure. The current test builds objects with The same
Would you be up for moving these to |
dolfim-ibm
left a comment
There was a problem hiding this comment.
@Shizoqua see the comment above, let's address it correctly for all the engines. Thanks for bringing it up
Issue resolved by this Pull Request:
Closes #3910
Summary
VLM engine cleanup can run during interpreter shutdown after module globals have been cleared. In that state,
_logmay beNone, causing cleanup to raise while trying to log completion.Fix
Guard cleanup logging when the module logger is unavailable across the affected VLM inference engines.
Tests
Added model-free regression coverage for the affected VLM engine cleanup paths with
_logcleared.The regression test fails before the fix with 5 failures and passes after the fix with 5 passed.
ruff checkandruff format --checkalso pass for the changed files.Checklist: