Commit graph

163 commits

Author SHA1 Message Date
edgchen1
5b3f79a11a Add gradle wrapper validation workflow. 2023-03-07 17:56:37 -08:00
Nat Kershaw (MSFT)
664e296270
Re-add api:javascript and api:java to the labeler (#14238) 2023-02-23 13:20:33 -08:00
Nat Kershaw (MSFT)
638f21b969
Upgrade doxygen to fix C API docs build issue (#13950) 2023-02-03 09:43:29 -08:00
pengwa
a1ed703b73
Fix Python format CI failures due to black && pyright package updates (#14521)
### Fix failures due to black && pyright package updates

#### Problem

In the passing 3 hours, all PRs have their Python lint CI failed. Many
files are reported not well formatted. I believe this is due to updated
black package did some changes. Also there is a pyright checking
failure, after investigation it is due to pyright package upgrade.

##### Failure 1: "Lint Python" failure related to pyright: 
```
Run jordemort/action-pyright@v1
Run $GITHUB_ACTION_PATH/script.sh
🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog
🔎 Running pyright with reviewdog 🐶 ...
  + npm exec --yes -- pyright@latest --outputjson --lib
  No configuration file found.
  pyproject.toml file found at /home/runner/work/onnxruntime/onnxruntime.
  Loading pyproject.toml file at /home/runner/work/onnxruntime/onnxruntime/pyproject.toml
  Assuming Python version 3.10
  Assuming Python platform Linux
  No include entries specified; assuming /home/runner/work/onnxruntime/onnxruntime
  stubPath /home/runner/work/onnxruntime/onnxruntime/typings is not a valid directory.
  Searching for source files
  Found 628 source files
  An internal error occurred while type checking file "/home/runner/work/onnxruntime/onnxruntime/tools/android_custom_build/build_custom_android_package.py": TypeError: Cannot read properties of undefined (reading 'paramType')
      at map (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:7982:91)
      at Array.map (<anonymous>)
      at filterOverloadMatchesForAnyArgs (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:7982:44)
      at validateOverloadsWithExpandedTypes (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:7879:40)
      at validateOverloadedFunctionArguments (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:8138:32)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:8904:48)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:3699:39)
      at doForEachSubtype (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeUtils.ts:673:9)
      at expandSubtype (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:3692:13)
      at mapSubtypesExpandTypeVars (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:3723:13)
      at validateCallArguments (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:8768:28)
      at getTypeOfCall (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:7374:36)
      at getTypeOfExpression (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:1022:30)
      at evaluateTypesForExpressionInContext (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:18807:21)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:866:13)
      at evaluateTypeForSubnode (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:19042:9)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:865:16)
      at s.getTypeResult (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/timing.ts:40:20)
      at O.visitReturn (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:900:48)
      at O.visit (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:526:29)
      at O.visitNode (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:933:21)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:915:37)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:303:19)
      at forEach (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:924:22)
      at Array.forEach (<anonymous>)
      at O.walkMultiple (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:922:15)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:917:18)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:303:19)
      at O._walkStatementsAndReportUnreachable (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:2450:18)
      at O.visitSuite (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:312:14)
      at O.visit (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:544:29)
      at O.visitNode (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:933:21)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:915:37)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:303:19)
      at O.visitFunction (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:638:18)
      at O.visit (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:442:29)
      at O.visitNode (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:933:21)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:915:37)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:303:19)
      at O._walkStatementsAndReportUnreachable (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:2450:18)
      at O.check (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:282:14)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/sourceFile.ts:1353:29)
      at s.timeOperation (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/timing.ts:44:28)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/sourceFile.ts:1350:45)
      at t.LogTracker.log (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/logTracker.ts:36:20)
      at t.SourceFile.check (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/sourceFile.ts:1348:33)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:[11](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:12)[33](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:35):40)
      at t.LogTracker.log (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/logTracker.ts:36:20)
      at L._checkTypes (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:1103:33)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:577:30)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:646:20)
      at s.runWithCancellationToken [as timeOperation] (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/timing.ts:44:28)
      at L._runEvaluatorWithCancellationToken (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:2467:41)
      at L.analyze (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:541:21)
      at analyzeProgram (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/analysis.ts:52:33)
      at t.BackgroundAnalysisProgram.startAnalysis (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/backgroundAnalysisProgram.ts:151:16)
      at Timeout._onTimeout (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/service.ts:1771:67)
      at listOnTimeout (node:internal/timers:559:17)
      at processTimers (node:internal/timers:502:7)
  Error performing analysis: TypeError: Cannot read properties of undefined (reading 'paramType')
      at map (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:7982:91)
      at Array.map (<anonymous>)
      at filterOverloadMatchesForAnyArgs (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:7982:44)
      at validateOverloadsWithExpandedTypes (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:7879:40)
      at validateOverloadedFunctionArguments (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:8138:32)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:8904:48)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:3699:39)
      at doForEachSubtype (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeUtils.ts:673:9)
      at expandSubtype (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:3692:13)
      at mapSubtypesExpandTypeVars (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:[37](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:40)23:13)
      at validateCallArguments (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:8768:28)
      at getTypeOfCall (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:7374:36)
      at getTypeOfExpression (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:1022:30)
      at evaluateTypesForExpressionInContext (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:18807:21)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:866:13)
      at evaluateTypeForSubnode (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:19042:9)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:865:16)
      at s.getTypeResult (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/timing.ts:40:20)
      at O.visitReturn (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:900:48)
      at O.visit (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:526:29)
      at O.visitNode (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:933:21)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:915:37)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:303:19)
      at forEach (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:924:22)
      at Array.forEach (<anonymous>)
      at O.walkMultiple (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:922:15)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:917:18)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:303:19)
      at O._walkStatementsAndReportUnreachable (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:2450:18)
      at O.visitSuite (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:312:14)
      at O.visit (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:544:29)
      at O.visitNode (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:933:21)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:915:37)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:303:19)
      at O.visitFunction (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:6[38](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:41):18)
      at O.visit (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:442:29)
      at O.visitNode (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:933:21)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/parseTreeWalker.ts:915:37)
      at O.walk (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:303:19)
      at O._walkStatementsAndReportUnreachable (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:2450:18)
      at O.check (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/checker.ts:282:14)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/sourceFile.ts:1353:29)
      at s.timeOperation (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/timing.ts:44:28)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/sourceFile.ts:1350:45)
      at t.LogTracker.log (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/logTracker.ts:36:20)
      at t.SourceFile.check (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/sourceFile.ts:1348:33)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:1133:[40](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:43))
      at t.LogTracker.log (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/logTracker.ts:36:20)
      at L._checkTypes (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:1103:33)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:577:30)
      at callback (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/typeEvaluator.ts:646:20)
      at s.runWithCancellationToken [as timeOperation] (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/common/timing.ts:44:28)
      at L._runEvaluatorWithCancellationToken (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:2467:[41](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:44))
      at L.analyze (/home/runner/.npm/_npx/fbb[43](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:46)b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/program.ts:541:21)
      at analyzeProgram (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/analysis.ts:52:33)
      at t.BackgroundAnalysisProgram.startAnalysis (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/backgroundAnalysisProgram.ts:151:16)
      at Timeout._onTimeout (/home/runner/.npm/_npx/fbb43b1786f81b3f/node_modules/pyright/dist/pyright-internal/src/analyzer/service.ts:1771:67)
      at listOnTimeout (node:internal/timers:559:17)
      at processTimers (node:internal/timers:502:7)
  + true
  + python3 /home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson/pyright_to_rdjson.py
  Traceback (most recent call last):
    File "/home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson/pyright_to_rdjson.py", line 53, in <module>
      print(pyright_to_rdjson(sys.stdin))
    File "/home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson/pyright_to_rdjson.py", line 8, in pyright_to_rdjson
      pyright: Dict = json.load(jsonin)
    File "/usr/lib/python3.10/json/__init__.py", line 293, in load
      return loads(fp.read(),
    File "/usr/lib/python3.10/json/__init__.py", line 3[46](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:49), in loads
      return _default_decoder.decode(s)
    File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/usr/lib/python3.10/json/decoder.py", line 3[55](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928568#step:9:58), in raw_decode
      raise JSONDecodeError("Expecting value", s, err.value) from None
  json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  + cleanup
  + '[' -n /tmp/tmp.o6rGAdR1LC ']'
  + '[' -d /tmp/tmp.o6rGAdR1LC ']'
  + rm -rf /tmp/tmp.o6rGAdR1LC
  Error: Process completed with exit code 1.
```

##### Failure 2: "Python format" failure related to "psf/black@stable": 

Many files are reported not well formatted, an example:
```
--- /home/runner/work/onnxruntime/onnxruntime/onnxruntime/python/onnxruntime_inference_collection.py	2023-02-01 03:25:08.361480 +0000
+++ /home/runner/work/onnxruntime/onnxruntime/onnxruntime/python/onnxruntime_inference_collection.py	2023-02-01 03:25:23.6[28](https://github.com/microsoft/onnxruntime/actions/runs/4060639890/jobs/6989928837#step:4:30)466 +0000
@@ -103,11 +103,10 @@
     """
     This is the main class used to run a model.
     """
 
     def __init__(self):
-
         # self._sess is managed by the derived class and relies on bindings from C.InferenceSession
         self._sess = None
         self._enable_fallback = True
 
would reformat /home/runner/work/onnxruntime/onnxruntime/onnxruntime/python/onnxruntime_inference_collection.py
     def get_session_options(self):
```

#### Root causes

Failure 1. `pyright` publish new release 1.1.292 about 4 hourse ago..
https://www.npmjs.com/package/pyright?activeTab=versions. If we revert
the version back to previous release 1.1.291, then this test pass.

Failure 2. `black` ublish its release few hours ago.
https://pypi.org/project/black/#history

![image](https://user-images.githubusercontent.com/10530022/215981502-fff0fb2f-5575-4537-aa2a-21c5a974eeb7.png)


#### Fixes

Failure 1. Fixed the `pyright` to use previous release 1.1.291.

Failure 2. This PR firstly attempted to update all impacted files based
on new version of black package offline. But we hit a throttling issue
when calling format services :
```
{"severity":"ERROR","time":"2023-02-01T08:00:08.090158864Z","logging.googleapis.com/sourceLocation":{"file":"/home/runner/work/reviewdog/reviewdog/doghouse/server/github_checker.go","line":"45","function":"github.com/reviewdog/reviewdog/doghouse/server.(*checkerGitHubClient).UpdateCheckRun"},"message":"UpdateCheckRun failed: {\"message\":\"Invalid request.\\n\\nOnly 65535 characters are allowed; 89431 were supplied.\",\"documentation_url\":\"https://docs.github.com/rest/reference/checks#update-a-check-run\"}"}
```

So an alternative fix is done here, e.g. fix the version of the black
package to previous release 22.12.0.

**Would like to get some feedback from @justinchuby, feel free to make
some change based on this to unblock other PRs.**

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
2023-02-01 06:39:51 -08:00
Nat Kershaw (MSFT)
26a6b40554
Delete add-issues-to-project (#14147)
It is not currently possible to get the appropriate org level
permissions for this action.

It should soon be possible to do this automatically within
[GitHub](https://github.com/microsoft/github-operations/issues/59#issuecomment-1275424404).
2023-01-11 14:33:37 -08:00
Nat Kershaw (MSFT)
b313055ad6
Updated issue router to migrated project (#14114) 2023-01-04 14:47:43 -08:00
Nat Kershaw (MSFT)
f344d4b3d1
Label issues with mobile when android or ios are present (#14033) 2023-01-04 13:03:25 -08:00
Nat Kershaw (MSFT)
a78ab4fbef
Add labeled to docs workflow trigger (#13979)
Capture the case where issue is manually labeled
2023-01-03 15:19:22 -08:00
Nat Kershaw (MSFT)
526368f4d8
Auto add docs issues to project (#13897) 2022-12-12 16:45:31 -08:00
Faith Xu
69fdb7c75a
Labeler: Add ROCm ep issue labeling (#13923)
### Description
Add ROCm EP to auto labeler
2022-12-12 16:27:20 -08:00
Nat Kershaw (MSFT)
21dd341e52
Add Google Analytics to python apidocs (#13901) 2022-12-09 15:44:12 -08:00
Nat Kershaw (MSFT)
43a7b520e4
Convert label config to one line regexes (#13702) 2022-11-19 11:38:29 -08:00
Yi Zhang
67bde18d0d
Update Win_GPU_CI trigger (#13290)
### Description
supplement of #13248

Add PR trigger 

https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#pr-triggers

fix: master -> main

Testted with #13289 #13292

NB:
the real pipeline is always triggered if the workflow yaml changed even
it's added in the path filter.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Make sure the real pipeline not run in the backend.
2022-10-12 15:22:42 +08:00
Yi Zhang
8a3407d54f
update file name in the comment (#13275)
### Description
Correct the file name in the comments of the generated yaml.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
2022-10-12 08:35:42 +08:00
Nat Kershaw (MSFT)
fb86edb19f
Update publish-c-apidocs.yml to use main instead of master (#13281) 2022-10-11 15:37:59 -07:00
Yi Zhang
ea128cdb18
skip windows GPU check if changes only in doc (#13248)
### Description
Use Path filter and fake workflow to skip windows GPU check if there's
only changes in doc.
Refs:

https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

The fake github yaml is generated by code.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

###verifications:###
In this PR:
since the win-gpu-ci-pipeline.yml and .github are updated, so the real
Windows GPU workflows are always triggered.

in #13256
To avoid update win-gpu-ci-pipleline.yml, I added the path filter in
devops page. the fake win GPU workflows triggered, and the real
workflows are skipped.
2022-10-11 13:51:44 +08:00
Justin Chu
595a0c8658
Disable clang-tidy CI (#13207)
Disable clang-tidy CI for now because it is creating a lot of false
positives like in https://github.com/microsoft/onnxruntime/pull/12998
2022-10-04 07:37:49 -07:00
Nat Kershaw (MSFT)
68218935b9
Fix syntax error in labeler.yml (#13193) 2022-09-30 23:10:21 -07:00
Nat Kershaw (MSFT)
0bf0991fa2
Update labeler.yml (#13186) 2022-09-30 15:43:33 -07:00
Nat Kershaw (MSFT)
eef0a98cae
Update and fix labeling rules (#13129) 2022-09-30 10:19:23 -07:00
Justin Chu
402e1995f0
Create clang-tidy CI (#12653)
Update clang-tidy config to prepare for creating a CI workflow to run
clang-tidy.
Added clangtidy check in CI

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
2022-09-30 08:05:38 -07:00
Faith Xu
440f31668f
Labeler: Test /i regex for case sensitivity (#13115)
### Description
Test if regex change will make auto labeling case insensitive
2022-09-27 13:58:09 -07:00
Nat Kershaw (MSFT)
ce2ea44a56
Try to fix GitHub labeling action (#12999) 2022-09-26 11:46:28 -07:00
Justin Chu
2f9b559391
Declutter pull_request_template (#13026)
Turn the instructions in pull_request_template into comments so
templated language no longer clutter the PR description section.
2022-09-21 14:56:30 -07:00
Faith Xu
94d9e9ad6d
[Issue labeler] Separate out C# api as separate label (#12951)
Separate out C# api as separate label
2022-09-15 17:36:57 -07:00
Cassie Breviu
5099dda42f
Lint updates csharp docs (#12962)
* fix lint issues on docfx.vendor.js file

* fix ci

* remove submodule

* fix ci

* Update var name to AcceptedList

* remove test branch from ci
2022-09-14 17:56:41 -05:00
sophies927
b1984278d9
Enable blank issues (#12885) 2022-09-07 23:28:17 -07:00
sophies927
f63bd0765d
New GitHub templates (#12777)
* Create 01-build.yml

* Create 02-documentation.yml

* Create 03-mobile.yml

* Create 04-web.yml

* Create 05-performance.yml

* Create 06-training.yml

* Create 07-feature_request.yml

* Create 08-general.yml

* Create config.yml

* Delete bug-performance-issue.md

* Delete feature_request.md

* Create labeler.yml

* Create labeler.yml

* Update Performance template to make model info optional.

* Update feature request description placeholder
2022-09-07 11:59:56 -07:00
Cassie Breviu
98b2b7f5bb
Update csharp documentation (#12830) 2022-09-01 22:14:03 -07:00
sophies927
548938fb97
Update stale.yml (#12813)
* Update stale.yml

Change the number of days of inactivity before an issue becomes stale from 60 to 5 and the number of days of inactivity before a stale issue is closed from 7 to 5. Update the exempt labels based on the redefined set of GH labels.

* Implement stale.yml feedback.
2022-09-01 20:50:46 -07:00
Justin Chu
6fe712b587
Create codeql.yml to replace LGTM (#12790)
**Description**: Create codeql.yml to replace LGTM

**Motivation and Context**

LGTM.com is shutting down and moving to github code scanning. This PR enables github code scanning.

cpp and c# support will be added in a separate pr.
2022-09-01 16:37:43 -07:00
Nat Kershaw (MSFT)
cc94ba7740
Update C# API docs workflow (#12796) 2022-08-31 09:41:01 -07:00
Cassie Breviu
3e57cd88fc
Csharp docfx update (#12755)
* update dest to csharp folder, update ci to remove unused files, update git ignore

* add test branch to ci
2022-08-29 08:13:45 -05:00
Cassie Breviu
e85dce8cea
Add csharp docfx (#12596)
* add docfx and gh action to build docs

* kick off build from feature branch

* Fix LGTM linting

* update az pipeline to win22 & remove nuget install

* remove azure ci changes

* fix implicit using to support 5.0

* fix more js issues

* remove resource designer changes

* remove space

* fix linting misspellings in autogenerated js temp

* fix misspellings in generated code

* delete log file
2022-08-25 09:51:32 -05:00
Nat Kershaw (MSFT)
cc9b3e1c37
Automate generation of javadocs and create PR with changes (#12515) 2022-08-12 12:03:38 -07:00
Adam Pocock
8a86b346a5
[Java] JNI refactor for ONNX Tensor (#12281)
Working on JNI refactor for OnnxTensor.
  Simplifying the error handling logic in createTensor.
  Collapsing casting branches and migrating to ONNX element type enum.
  Disable cpplint for JNI C files.
2022-08-08 12:48:30 -07:00
Changming Sun
44ec2cf088
Update publish-python-apidocs.yml (#12433) 2022-08-03 10:17:00 -07:00
Nat Kershaw (MSFT)
df8dd41a8e
Automatically run workflows to generate API docs PRs (#11749) 2022-07-29 10:24:59 -07:00
Justin Chu
d2b25a7c1c
Reduce CI noise from Python lint (#12270)
Description: Reduce CI noise from Python lint

Motivation and Context

Disable "missing-docstring" in pylint. This is usually noisy in tests
Show only added lint messages only for pyright
2022-07-27 13:42:29 -07:00
Alexey Gladyshev
d31db1aa57
[TVM EP][CI] Integrate TVM EP into ORT public CI on Windows (#12161)
* Integrate TVM EP into ORT public CI on Windows

* empty commit for restart pylint

* empty commit for restart pylint
2022-07-18 11:12:16 +02:00
Valery Chernov
3b0aaa9e0e
[TVM EP] support build on Windows (#11851)
* add description of build ORT+TVM EP on Windows

* fix cmake error related to symlink creation on Windows

* add llvm config path to build flags for correct build on Windows

* update TVM_EP.md for llvm_config build arg

* fix warnings skipping during build on Windows

* fix using string or wstring for model path to correct build on Windows (MSVC error)

* fix error in custom logger for correct build on Windows

* implement glob algorithm for Windows

* additional build fixes

* update TVM with export of VM symbols for dll

* description of nasm issue and workaround

* update TVM with export of Executable from VM symbols for dll

* description of installation of ipp-crypto dependencies on Windows

* cmake key for ipp-crypto build

* fix wstring for TVMso EP

* fix ipp-crypto build

* cmake key onnxruntime_TVM_USE_HASH switch off not specific methods, but full hash functionality

* fix absolute path to compiled lib

* update TVM_EP.md, fix lint warnings

* update TVM_EP.md

* small fixes after review

* switch on handshake functionality for Linux workflow

Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
Co-authored-by: KJlaccHoeUM9l <wotpricol@mail.ru>
2022-07-13 10:48:42 +02:00
Valery Chernov
8ba8146650
[TVM] handshake mechanism for support of TVMso EP (#11437)
* infrastructure for handshake mechanism was implemented. sha256 was selected as first hash algorithm

* check hash during compile in TVMso EP

* add IPP-CRYPTO to external dependencies for TVM EP

* made checkHash method constant

* removed the public implementation of the SHA-256 algorithm so as not to cause a license conflict

* implemented SHA-256 calculation using ipp-crypto library

* fix dependency for ipp-crypto

* add provider options for hash check

* update documentation for added provider options

* add hash check condition

* fix docs

* fix lint

* fix ORT_THROW

Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
Co-authored-by: KJlaccHoeUM9l <wotpricol@mail.ru>
2022-06-29 14:57:18 +02:00
Changming Sun
a93ebd2503
Move tvm pipeline to Github Actions (#11721) 2022-06-13 11:38:44 -07:00
Justin Chu
913100885b
Remove the redundant black check in CI (#11790)
We have two black checks in CI for different scopes (PR, full repo). Now that the repo level black check is required, we can remove the PR level check.
2022-06-08 16:58:43 -07:00
Gary Miguel
b67c0f639c
Remove filter_mode input from pyflakes GitHub action (#11644)
Previously it triggered:

`Warning: Unexpected input(s) 'filter_mode', valid inputs are ['entryPoint', 'args', 'github_token', 'level', 'reporter']`
2022-05-27 07:59:17 -07:00
Justin Chu
d9c9adb78b
Add python static type checking in CI checks (#11518)
- Enable pyright and pylint (https://github.com/microsoft/pyright) in CI
- Enable pyright, pylint and bandit by default in VS code

Pylint has some good style checks. pyright is Microsoft's static type checker.
2022-05-16 13:26:56 -07:00
Justin Chu
f94b25933a
ci(cpplint): Ignore runtime/references warnings (#11499)
Allow non-const references 6f85d3e5c8/docs/Coding_Conventions_and_Standards.md (L11-L12)
2022-05-12 07:51:45 -07:00
Justin Chu
4ec5fe5c8a
Github action: Inline lint python / js / cpp (#11328)
Uses the reviewdog action which supports inline reporting.
2022-04-26 14:17:28 -07:00
Faruk D
a00d24066a
Fix CITATION.cff and add automatic validation of your citation metadata (#10478)
* Add cffconvert.yml to validate CITATION.cff

* Fix CITATION.cff by removing duplicate title and correcting the license

Co-authored-by: Abel Soares Siqueira <abel.s.siqueira@gmail.com>
2022-04-13 10:03:52 -07:00
Nat Kershaw (MSFT)
2d961604b1
Refactor Python API docs to better explain IO binding scenarios (#10651) 2022-03-15 09:40:59 -07:00
Nat Kershaw (MSFT)
d52d3c0052
Update C/C++ API docs automation to create a PR (instead of push to publish branch) (#10093) 2022-01-07 16:16:47 -08:00
Nat Kershaw (MSFT)
0c517112c4
Automate Python API docs generation (#10116) 2022-01-03 18:22:22 -08:00
Nat Kershaw (MSFT)
b4434c7694
Automate generation of C/C++ API docs (#9997) 2021-12-10 17:45:50 -08:00
Pranav Sharma
969eb545d1
Update issue template to ask users to check known issues to avoid repetition. (#8288) 2021-07-02 15:36:14 -07:00
Pranav Sharma
a9548283d0
Don't mark issues that are marked as enhancement as stale (#6134) 2020-12-14 18:57:40 -08:00
Nat Kershaw (MSFT)
81ff168833
Update stale.yml with current labels and mark stale items as "stale" (#4831) 2020-08-18 13:25:57 -07:00
Faith Xu
a4127fc185
Add stale bot (#4323)
* Add stalebot

* Update exemptLabels
2020-06-30 01:51:09 -07:00
Pranav Sharma
497e83eda5
Minor update to the issue template. Add a line to attach model where applicable. (#3339) 2020-03-26 14:28:27 -07:00
Faith Xu
5b93b02c69 Issue template update (#1339)
* Update to include urgency

* Wording update

* Wording update
2019-07-07 23:38:52 -07:00
Faith Xu
f67a1629fc Documentation reorganization (#1143)
* Update Versioning.md

* Update Versioning.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update BUILD.md

* Update HighLevelDesign.md

* Update Versioning.md

* Update README.md

* Update tool compat table

* typo

* Updates based on feedback

* Update template to include model

* Updates based on feedback

* Typos
2019-07-01 17:11:50 -07:00
Pranav Sharma
08ff75930b
Add pull request template (#1249) 2019-06-18 11:19:54 -07:00
jignparm
acc8ac58d2
Fix C-API sample. Update Issue template. (#750)
* Fix C-API sample. Update Issue template.

* switch back to signed int

* update from int to size_t
2019-04-02 13:37:50 -07:00
Pranav Sharma
728c3c078e
Update issue templates (#62) 2018-11-29 15:37:40 -08:00