Skip to content
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

pytest special test case 3 #20313

Merged
merged 6 commits into from
Nov 16, 2023

Conversation

PRATHAM-SPS
Copy link
Contributor

Details:

  • Replaced the generator's functionality with pytest

Tickets:

  • 110705

@PRATHAM-SPS PRATHAM-SPS requested a review from a team as a code owner October 9, 2023 09:12
@github-actions github-actions bot added the category: MO Model Optimizer label Oct 9, 2023
@PRATHAM-SPS
Copy link
Contributor Author

PRATHAM-SPS commented Oct 9, 2023

Hello @rkazants When I test this file on my system with unittest 12 test cases get failed...
So what I have done is coverted it into pytest keeping the number of failed test cases same as unittest.

@p-wysocki
Copy link
Contributor

@rkazants could you please take a look?

@p-wysocki
Copy link
Contributor

build_jenkins

@rkazants
Copy link
Member

Hi @PRATHAM-SPS,

Please check the test, now there is a failure:

install/tests/mo/unit_tests/mo/utils/freeze_placeholder_test.py:165: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/__t/Python/3.11.6/x64/lib/python3.11/site-packages/openvino/tools/mo/convert_impl.py:409: in prepare_ir
    ngraph_function = moc_pipeline(argv, moc_front_end)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

argv = Namespace(feManager=<FrontEndManager>, extensions=['/__w/openvino/openvino'], use_legacy_frontend=None, use_new_fronte...2'>, 'in2': <class 'numpy.float32'>}, unnamed_freeze_placeholder_with_value={}, layout_values=[], mean_scale_values={})
moc_front_end = <FrontEnd 'onnx'>

    def moc_pipeline(argv: argparse.Namespace, moc_front_end: FrontEnd):
        """
        Load input model and convert it to nGraph function
        :param: argv: parsed command line arguments
        :param: moc_front_end: Loaded Frontend for converting input model
        :return: converted nGraph function ready for serialization
        """
        input_checkpoint = getattr(argv, 'input_checkpoint', None)
        share_weights = getattr(argv, 'share_weights', True)
        if argv.input_model and input_checkpoint:
            # frozen format with v1 checkpoints
            input_model = moc_front_end.load([argv.input_model, argv.input_checkpoint], share_weights)
        elif argv.input_model:
>           input_model = moc_front_end.load(argv.input_model, share_weights)
E           RuntimeError: Exception from src/frontends/onnx/onnx_common/src/parser.cpp:21:
E           Could not open the file: test_model.onnx

@@ -61,8 +60,7 @@ def get_test_default_frontends():
return {"onnx": "new", "tf": "legacy"}


@generator
class TestMoFreezePlaceholder(unittest.TestCase):
class TestMoFreezePlaceholder():
def setUp(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably setUp is not longer working now that is why the input model is not found. Please fix

@rkazants
Copy link
Member

build_jenkins

@PRATHAM-SPS
Copy link
Contributor Author

build_jenkins

@rkazants can you please merge this PR, and please simply merge the PR don't squeeze and merge.

Thankyou,
Pratham Ingawale

@rkazants rkazants merged commit a1416ed into openvinotoolkit:master Nov 16, 2023
33 checks passed
@rkazants
Copy link
Member

@PRATHAM-SPS, merged. We always squash and merge PRs. Sorry.
@PRATHAM-SPS, thanks a lot for your contribution. Can you please proceed with removing test-generator dependencies in other parts. If you are completely done, can you please try to remove it from requirements.txt files in OV?

Best regards,
Roman

@PRATHAM-SPS
Copy link
Contributor Author

@PRATHAM-SPS, merged. We always squash and merge PRs. Sorry. @PRATHAM-SPS, thanks a lot for your contribution. Can you please proceed with removing test-generator dependencies in other parts. If you are completely done, can you please try to remove it from requirements.txt files in OV?

Best regards, Roman

yes, some files are remain i will create PR for them , squash and merge PR reflacts only one dot on profile :(

@rkazants rkazants added the ExternalPR External contributor label Nov 17, 2023
@rkazants rkazants added this to the 2023.3 milestone Nov 17, 2023
byungilm pushed a commit to byungilm/openvino that referenced this pull request Nov 17, 2023
* pytest:- freeze_placeholder_test.py

* trying with classmethod

---------

Co-authored-by: Przemyslaw Wysocki <[email protected]>
allnes pushed a commit to allnes/openvino that referenced this pull request Nov 23, 2023
* pytest:- freeze_placeholder_test.py

* trying with classmethod

---------

Co-authored-by: Przemyslaw Wysocki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: MO Model Optimizer ExternalPR External contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants