microsoft / onnxjs

ONNX.js: run ONNX models using JavaScript
Other
1.75k stars 130 forks source link

Adding TopK: docs/operators.md pre-commit hook failed #298

Open J3698 opened 3 years ago

J3698 commented 3 years ago

I would like to add TopK at least for CPU. Unfortunately, I am getting the following error upon committing:

ERR! pre-commit File(s) not formatted:
ERR! pre-commit docs/operators.md

It looks like that file is autogenerated, should I just bypass that hook? Thanks!

xzhu1900 commented 3 years ago

Hi J3698,

Yes, operators.md is autogenerated. When a new change is made to the operator set, we need to also update this file. You can try adding that file and committing again. That should be able to resolve this error.

J3698 commented 3 years ago

Thanks, that worked! I didn't realize it would require two commits. I'm wondering, would it be useful for me to add a message on failure that you can try again? Then new contributors like myself will know that something changed.