Skip to content

Commit

Permalink
fix openvinotoolkit#18388 by manually del runtime_model in python code
Browse files Browse the repository at this point in the history
  • Loading branch information
FredBill1 committed Feb 15, 2024
1 parent 6accdd7 commit 084f6fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bindings/python/tests/test_runtime/test_compiled_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Copyright (C) 2018-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import gc

import pytest
import numpy as np

Expand All @@ -27,6 +29,9 @@ def test_get_runtime_model(device):
compiled_model = generate_relu_compiled_model(device)
runtime_model = compiled_model.get_runtime_model()
assert isinstance(runtime_model, Model)
# make sure runtime_model is destroyed before the dynamic library is unloaded, as described in issue #18388
del runtime_model
gc.collect()


def test_export_import(device):
Expand Down

0 comments on commit 084f6fc

Please sign in to comment.