Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@wschin
Copy link
Collaborator

@wschin wschin commented Apr 19, 2018

  1. Need to consider cases where no default ONNX operator set exists
  2. Cannot assume that value_info's are all tensors (CoreML's neural
    network classifiers contain ZipMap, so they may produce Maps)
  3. Make some error messages actionable

1. Need to consider cases where no default ONNX operator set exists
2. Cannot assume that value_info's are all tensors (CoreML's neural
network classifiers contain ZipMap, the they may produce Maps)
enforce_has_field(type, elem_type);
enforce_has_field(type, shape);
} break;
default:
Copy link
Member

Choose a reason for hiding this comment

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

we should add #ifdef ONNX_ML and add cases of map/sequence in-place.

onnx/checker.cc Outdated
}
auto dit = opset_imports.find(ONNX_DOMAIN);
if (dit == opset_imports.end()) {
if (opset_imports.size() < 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

.empty()

@AppVeyorBot
Copy link

Build onnx 0.3.2387 completed (commit 4fec2d4b7b by @wschin)

onnx/checker.cc Outdated
}
auto dit = opset_imports.find(ONNX_DOMAIN);
if (dit == opset_imports.end()) {
if (opset_imports.empty()) {
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem right to me. Do you want to avoid the check when you have other domain?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The following checks are not necessary if at least one domain exists because (1) opset_import is good with IR>=3 (2) default opset_imports should be set only if opset_import is empty.

Copy link
Member

Choose a reason for hiding this comment

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

I think the right check should be:

if (model.ir_version() >= 3) {
  // enforce opset_imports is not empty
} else {
  // enforce opset_imports is empty,
  // and set the default value for ONNX_DOMAIN
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks better.

} else {
if (opset_imports.empty())
opset_imports[ONNX_DOMAIN] = 1;
}
Copy link
Member

Choose a reason for hiding this comment

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

else {
fail_check(
"model with IR version < 3 should have no opset_import specified for ONNX");
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Thanks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It breaks a lot of torch tests.

@linkerzhang
Copy link
Member

@houseroad , looks like some of the tests are not following the fact that opset_import should not be there if ir_version <= 2. Could you help on it please?

@raymondxyang raymondxyang self-requested a review April 19, 2018 22:31
@AppVeyorBot
Copy link

Build onnx 0.3.2402 failed (commit bfc1669fef by @wschin)

@AppVeyorBot
Copy link

Build onnx 0.3.2405 failed (commit a101afba21 by @wschin)

@houseroad
Copy link
Member

#788 should solve the problem

@AppVeyorBot
Copy link

Build onnx 0.3.2418 failed (commit 897f159ca2 by @linkerzhang)

Copy link
Contributor

@bddppq bddppq left a comment

Choose a reason for hiding this comment

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

LG. Please wait for the test cases update PR to be merged first and then rebase this one.

@AppVeyorBot
Copy link

Build onnx 0.3.2427 failed (commit f95c64fec7 by @houseroad)

@AppVeyorBot
Copy link

Build onnx 0.3.2429 failed (commit 1f2d3ac5f6 by @bddppq)

Copy link
Member

@linkerzhang linkerzhang left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@linkerzhang linkerzhang reopened this Apr 20, 2018
@AppVeyorBot
Copy link

Build onnx 0.3.2433 failed (commit af7fef5b47 by @bddppq)

@linkerzhang
Copy link
Member

@houseroad looks like the tests still fail :(.

@houseroad
Copy link
Member

@linkerzhang Some test cases were not updated. Checking the reason

@AppVeyorBot
Copy link

Build onnx 0.3.2437 failed (commit 9ad9ab73ba by @bddppq)

@AppVeyorBot
Copy link

Build onnx 0.3.2441 failed (commit c826f80c41 by @linkerzhang)

@AppVeyorBot
Copy link

Build onnx 0.3.2444 failed (commit ba96ba9bab by @linkerzhang)

@linkerzhang linkerzhang merged commit e3da0f9 into onnx:master Apr 21, 2018
raymondxyang pushed a commit to raymondxyang/onnx that referenced this pull request Apr 24, 2018
* Fix some checks not ideal to onnx-ml

1. Need to consider cases where no default ONNX operator set exists
2. Cannot assume that value_info's are all tensors (CoreML's neural
network classifiers contain ZipMap, the they may produce Maps)

* Address comments and improve some more error messages

* Make SSA not abbreviated

* Address a comment

* a fix

(cherry picked from commit e3da0f9)
linkerzhang pushed a commit that referenced this pull request Apr 24, 2018
* Cherry picked fix on python Schema API

* Merge Rel 1.1.0 branch into master (#657)

* Increase Version number for release 1.1.0

* Increase version number to 1.1.1

(cherry picked from commit ecac1c1)

* Fix some checks not ideal to onnx-ml (#781)

* Fix some checks not ideal to onnx-ml

1. Need to consider cases where no default ONNX operator set exists
2. Cannot assume that value_info's are all tensors (CoreML's neural
network classifiers contain ZipMap, the they may produce Maps)

* Address comments and improve some more error messages

* Make SSA not abbreviated

* Address a comment

* a fix

(cherry picked from commit e3da0f9)

* Cherry picked updated testcases

* Cherry pick updates on testcases (1)

* Remove incorrect cases (#791)

* Update the remainig cases (#794)

* Fix incorrect conflict merge

* Remove unpassed testcases

* Bump up version number
linkerzhang pushed a commit that referenced this pull request Apr 25, 2018
* Cherry picked fix on python Schema API

* Merge Rel 1.1.0 branch into master (#657)

* Increase Version number for release 1.1.0

* Increase version number to 1.1.1

(cherry picked from commit ecac1c1)

* Fix some checks not ideal to onnx-ml (#781)

* Fix some checks not ideal to onnx-ml

1. Need to consider cases where no default ONNX operator set exists
2. Cannot assume that value_info's are all tensors (CoreML's neural
network classifiers contain ZipMap, the they may produce Maps)

* Address comments and improve some more error messages

* Make SSA not abbreviated

* Address a comment

* a fix

(cherry picked from commit e3da0f9)

* Cherry picked updated testcases

* Cherry pick updates on testcases (1)

* Remove incorrect cases (#791)

* Update the remainig cases (#794)

* Fix incorrect conflict merge

* Remove unpassed testcases

* Bump up version number

* Kezhan/update ml op spec (#799)

* update normalizer.

* update ml op spec.

* update traditional ops.

* update ml op doc

(cherry picked from commit bf00ae6)
Ac2zoom pushed a commit to Ac2zoom/onnx that referenced this pull request Jun 21, 2018
* Fix some checks not ideal to onnx-ml

1. Need to consider cases where no default ONNX operator set exists
2. Cannot assume that value_info's are all tensors (CoreML's neural
network classifiers contain ZipMap, the they may produce Maps)

* Address comments and improve some more error messages

* Make SSA not abbreviated

* Address a comment

* a fix
jcwchen pushed a commit to jcwchen/onnx that referenced this pull request Sep 23, 2020
* Fix some checks not ideal to onnx-ml

1. Need to consider cases where no default ONNX operator set exists
2. Cannot assume that value_info's are all tensors (CoreML's neural
network classifiers contain ZipMap, the they may produce Maps)

* Address comments and improve some more error messages

* Make SSA not abbreviated

* Address a comment

* a fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants