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
Validate the generated number of input.pb and output.pb and new node files in CIs #4514
Conversation
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
IF NOT %ERRORLEVEL% EQU 0 ( | ||
@echo "git diff for test generation returned failures. Please check updated node test files" | ||
EXIT 1 | ||
) | ||
git diff --exit-code --diff-filter=ADR -- . :!onnx/onnx-data.proto :!onnx/onnx-data.proto3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, deleted, renamed for *output_*.pb
and *input_*.pb
will be detected.
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
…to jcw/validate-i/o
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a great addition and this check can save a lot of development time, especially for new contributors. I had issues myself at #4481, which would be easily detected by this check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Not sure whether we can directly add --clean in the script: Line 25 in de24599
Or even set --clean=True by default. |
Would it be worthwhile for the doc generator to track files it generated and finally issue a warning message if there were old files (not generated in this run)? |
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Makes sense to me. I have added such a check in cmd_tools and if there are additional files, it will throw a warning to let users understand. Please review it. Thanks! |
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@gramalingam if you have time, could you please review this PR? (It needs an approval from SIG-operators-approvers as well). Thank you! |
So, all the deleted *.pb files were spurious (out-dated) files created by this issue? Good to catch them and remove them! |
Yes, they were caught by the enhanced CI check (with --clean) brought by this PR because they cannot be regenerated by any existing test script. Therefore I removed them. |
…files in CIs (onnx#4514) * validate the generated number of input.pb and output.pb in CIs Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * --diff-filter=ADR Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * add --clean for generate-data Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * add --clean in CIs Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * remove unreproducible tests Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * add sentences in AddNewOp.md Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * check original directory number Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * typo Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * nit: warning msg Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Description
--clean
. The tool will throw a warning if it detects there are other model directories if they cannot be reproduced.Motivation and Context
Some validation will be missing after #4431. We should additionally handle the validation of generated number of input.pb and output.pb