Skip to content

Conversation

jcwchen
Copy link
Member

@jcwchen jcwchen commented Feb 6, 2023

Description

These models were moved to git-lfs in https://github.com/onnx/models. Currently all ONNX Model Zoo models will be tested weekly by the weekly CI pipleine: https://github.com/onnx/onnx/blob/main/.github/workflows/weekly_mac_ci.yml. Removing testing real models from AWS should be fine. To faster unblock global pipeline faillure, temporarily disable testing real models from AWS. We will add them back in the near future.

Motivation and Context

See #4857. The models from AWS are broken.

@jcwchen jcwchen requested a review from a team as a code owner February 6, 2023 21:17
@jcwchen jcwchen added the run release CIs Use this label to trigger release tests in CI label Feb 6, 2023
Copy link
Collaborator

@liqunfu liqunfu left a comment

Choose a reason for hiding this comment

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

THanks for the fix! I agree to remove the failing tests for now. Shall we replace them later?

@wschin
Copy link
Collaborator

wschin commented Feb 7, 2023

It's better to explain how future developers will run equivalent tests on their local machines in this PR. Can you add a document with real code to explain how to use ONNX hub for test a model with example data? I saw limited doc for loading a model but doesn't find instructions to really execute the model with example data.

@jcwchen jcwchen changed the title Remove testing real models from AWS [WIP] Remove testing real models from AWS Feb 7, 2023
@yuslepukhin
Copy link
Contributor

This is massif. Can we try this PR on ORT branch to make sure this fixes our pipelines?

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen jcwchen changed the title [WIP] Remove testing real models from AWS Temporally disable testing real models from AWS Feb 7, 2023
@jcwchen jcwchen changed the title Temporally disable testing real models from AWS Temporarily disable testing real models from AWS Feb 7, 2023
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen
Copy link
Member Author

jcwchen commented Feb 7, 2023

After discussion with Liqun, we decide to temporarily disable testing real models from AWS in onnx repo to faster unblock pipeline failures. Liqun will try to move them elsewhere like Azure. Then, we will add these tests back with updated URL instead of the current AWS URL.

It's better to explain how future developers will run equivalent tests on their local machines in this PR. Can you add a document with real code to explain how to use ONNX hub for test a model with example data? I saw limited doc for loading a model but doesn't find instructions to really execute the model with example data.

Good point. IIUC, onnx repo only tests the model itself: https://github.com/onnx/onnx/blob/main/onnx/test/test_backend_test.py#L38-L42 since previously there is no runtime implementation here. So the corresponding tests will be (Take AlexNet as an example)

import itertools
import onnx
model = onnx.hub.load('alexnet', opset=9)
onnx.checker.check_model(model)
model = onnx.shape_inference.infer_shapes(model, check_type=True, strict_mode=True)
value_infos = {
    vi.name: vi
    for vi in itertools.chain(model.graph.value_info, model.graph.output)
}
for node in model.graph.node:
    for i, output in enumerate(node.output):
        if node.op_type == "Dropout" and i != 0:
            continue
        assert output in value_infos
        tt = value_infos[output].type.tensor_type
        assert tt.elem_type != onnx.TensorProto.UNDEFINED
        for dim in tt.shape.dim:
            assert dim.WhichOneof("value") == "dim_value"

I will provide the full equivalent testing method if we eventually decide to remove them for good.

@jcwchen
Copy link
Member Author

jcwchen commented Feb 7, 2023

This is massif. Can we try this PR on ORT branch to make sure this fixes our pipelines?

ORT pipelines will be OK for now by manually disabling these real model tests (from onnx repo) there: microsoft/onnxruntime#14606. In the near future, after we have transferred these models to a new place, we will update the URL in ONNX repo, have a patch release commit with that update and then consume that ONNX commit in ORT to recover these tests. Ideally only URLs will be updated and all other relevant stuff in ONNX will be consistent.

@jcwchen jcwchen added the module: CI pipelines Issues related to the CI pipeline label Feb 7, 2023
@xadupre
Copy link
Contributor

xadupre commented Feb 7, 2023

Instead of copying the models somewhere else, would it be possible to remove the initializers and replace them by a node ConstantOfShape. The models should be a lot smaller and could be part of the repository without disabling the tests. I tried this idea in PR #4861.

@jcwchen jcwchen closed this in #4865 Feb 7, 2023
@jcwchen jcwchen deleted the jcw/remove-aws branch February 8, 2023 01:18
@jcwchen
Copy link
Member Author

jcwchen commented Feb 8, 2023

Thank you all for the input. This PR is superseded by #4865 Instead of disabling them, we have replaced the broken URL with the new URL under onnxruntime.ai. Current ONNX 1.13 still has the old broken URLs and so we will have a a patch 1.13.1 release which includes #4865.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: CI pipelines Issues related to the CI pipeline run release CIs Use this label to trigger release tests in CI topic: test
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants