Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet)
from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-dotnet/releases">actions/setup-dotnet's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<p>This major release includes the following
<strong>changes:</strong></p>
<ul>
<li><a
href="https://redirect.github.com/actions/setup-dotnet/issues/219">#219</a>
New input <code>dotnet-quality</code> was added in <a
href="https://redirect.github.com/actions/setup-dotnet/pull/315">#315</a>:</li>
</ul>
<pre lang="yaml"><code> - uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-quality: 'preview'
- run: dotnet build <my project>
</code></pre>
<p>More in detail <a
href="https://github.com/actions/setup-dotnet#using-the-dotnet-quality-input">here</a>.</p>
<ul>
<li><a
href="https://redirect.github.com/actions/setup-dotnet/issues/241">#241</a>
The output variable <code>dotnet-version</code> which contains the
installed by the action SDK version was added in <a
href="https://redirect.github.com/actions/setup-dotnet/pull/324">#324</a>:</li>
</ul>
<pre lang="yaml"><code> - uses: actions/setup-dotnet@v3
id: cp310
with:
dotnet-version: '3.1.422'
- run: echo '${{ steps.cp310.outputs.dotnet-version }}' # outputs
3.1.422
</code></pre>
<p>More in detail <a
href="https://github.com/actions/setup-dotnet/tree/main#dotnet-version">here</a>.</p>
<ul>
<li>The <code>dotnet-version</code> syntax was updated and now it allows
to specify the prerelease version without using
<code>include-prerelease</code> input. The
<code>include-prerelease</code> input was cut out:</li>
</ul>
<pre lang="yaml"><code> - uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.0-preview.6'
</code></pre>
<p>More in detail <a
href="https://github.com/actions/setup-dotnet#supported-version-syntax">here</a>.</p>
<ul>
<li><a
href="https://redirect.github.com/actions/setup-dotnet/issues/251">#251</a>
The problem with out of support .NET version warnings was solved in <a
href="https://redirect.github.com/actions/setup-dotnet/pull/315">#315</a>.</li>
</ul>
<p><strong>Breaking changes</strong>:</p>
<ul>
<li>Installation paths for Windows and Ubuntu images were changed to
match the location of pre-installed SDKs. In more detail, read <a
href="https://github.com/actions/setup-dotnet/blob/main/docs/adrs/v3-setup-dotnet.md#breaking-changes">here</a>.</li>
</ul>
<h2>Add support for Windows-arm</h2>
<p>In scope of this release we <a
href="https://redirect.github.com/actions/setup-dotnet/pull/320">add
support for Windows-arm</a>. Besides, we change getInput to <a
href="https://redirect.github.com/actions/setup-dotnet/pull/250">getBooleanInput</a>
for include-prerelease.</p>
<h2>Package updates, support for global json file in a subdirectory,
installer scripts updates</h2>
<p>This release includes the following PRs:</p>
<ul>
<li>Adding support for the <code>global-json-file</code> input: <a
href="https://redirect.github.com/actions/setup-dotnet/issues/276">#276</a>
Example of usage:
<pre lang="yaml"><code>- uses: actions/setup-dotnet@v2
with:
global-json-file: csharp/global.json
- run: dotnet build <my project>
working-directory: csharp
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3447fd6a9f"><code>3447fd6</code></a>
feat: Cache NuGet global-packages folder (<a
href="https://redirect.github.com/actions/setup-dotnet/issues/303">#303</a>)</li>
<li><a
href="916351aac9"><code>916351a</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/setup-dotnet/issues/430">#430</a>
from akv-platform/remove-implicit-dependencies</li>
<li><a
href="1ad2e312fa"><code>1ad2e31</code></a>
Add missing dependency</li>
<li><a
href="e3f84b8f7a"><code>e3f84b8</code></a>
Install eslint-plugin-node</li>
<li><a
href="ba848a34bb"><code>ba848a3</code></a>
Update configuration files</li>
<li><a
href="aa983c550d"><code>aa983c5</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/setup-dotnet/issues/428">#428</a>
from akv-platform/add-latest-patch-syntax</li>
<li><a
href="b891376106"><code>b891376</code></a>
Merge branch 'main' into add-latest-patch-syntax</li>
<li><a
href="b05a3f26b3"><code>b05a3f2</code></a>
Fix review points, rebuild solution</li>
<li><a
href="5fdecd2063"><code>5fdecd2</code></a>
Increase amount of retries for Dotnet installation scripts tests (<a
href="https://redirect.github.com/actions/setup-dotnet/issues/427">#427</a>)</li>
<li><a
href="38b49fb717"><code>38b49fb</code></a>
Fix informational and debug messages</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/setup-dotnet/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1. Enable xnnpack test
2. Change TSA database name from onnxruntime_master to onnxruntime_main.
This is a leftover of renaming the "master" branch to "main"
3. Add two static analysis jobs for WinML and DML
4. Rename the machine pool "aiinfra-dml-winbuild" to
"onnxruntime-Win2019-GPU-dml-A10", so that the internal and public ADO
instances use the same machine pool name.
5. Move Windows GPU CI build pipeline from "onnxruntime-Win2022-GPU-T4"
to "onnxruntime-Win2022-GPU-A10" machine pool, because we do not have
enough T4 GPUs.
- Fix flatbuffers flatc warning, unused-but-set-variable.
- Address `-Wshorten-64-to-32` warnings (fix in our code, allow in dependencies' code).
- Update CI builds to use Xcode 14.3.
- Update minimum iOS version to 12.0.
- Update Mac hosted agents to MacOS 13 where possible.
### Description
<!-- Describe your changes. -->
Old pool | New pool | Notes
-- | -- | --
onnxruntime-Win-CPU-2019 | onnxruntime-Win-CPU-2022 |
onnxruntime-Win2019-CPU-training | onnxruntime-Win2022-CPU-training-AMD
|
onnxruntime-Win2019-CPU-training-AMD |
onnxruntime-Win2022-CPU-training-AMD | Same as the above
onnxruntime-Win2019-GPU-dml-A10 | Need be created | You need to create a
new image for it first
onnxruntime-Win2019-GPU-T4 | onnxruntime-Win2022-GPU-T4 |
onnxruntime-Win2019-GPU-training-T4 | onnxruntime-Win2022-GPU-T4 | Same
as the above because we do not have many T4 GPUs
onnxruntime-tensorrt8-winbuild-T4| TBD|TBD
Win-CPU-2021|onnxruntime-Win-CPU-2022| will do it in next PR
Win-CPU-2019|onnxruntime-Win2022-Intel-CPU'| Intel CPU needed for
win-ci-pipeline.yml -> `stage: x64_release_dnnl`
<br class="Apple-interchange-newline">
### Motivation and Context
With vs2022 we can take the advantage of 64bit compiler. It also with
better c++20 support
### Description
- Fix lintrunner configurations to always use `python` instead of
`python3`.
- Set up dependabot
- Moved dependencies to requirements-lintrunner to allow dependabot to
update it similar to https://github.com/onnx/onnx/pull/5124
Add workflow to update Objective-C API docs. Remove the Objective-C API doc generation step from the packaging pipeline.
There are similar workflows for automatically updating other language API docs. This change enables this for Objective-C too.
### Description
`lintrunner` is a linter runner successfully used by pytorch, onnx and
onnx-script. It provides a uniform experience running linters locally
and in CI. It supports all major dev systems: Windows, Linux and MacOs.
The checks are enforced by the `Python format` workflow.
This PR adopts `lintrunner` to onnxruntime and fixed ~2000 flake8 errors
in Python code. `lintrunner` now runs all required python lints
including `ruff`(replacing `flake8`), `black` and `isort`. Future lints
like `clang-format` can be added.
Most errors are auto-fixed by `ruff` and the fixes should be considered
robust.
Lints that are more complicated to fix are applied `# noqa` for now and
should be fixed in follow up PRs.
### Notable changes
1. This PR **removed some suboptimal patterns**:
- `not xxx in` -> `xxx not in` membership checks
- bare excepts (`except:` -> `except Exception`)
- unused imports
The follow up PR will remove:
- `import *`
- mutable values as default in function definitions (`def func(a=[])`)
- more unused imports
- unused local variables
2. Use `ruff` to replace `flake8`. `ruff` is much (40x) faster than
flake8 and is more robust. We are using it successfully in onnx and
onnx-script. It also supports auto-fixing many flake8 errors.
3. Removed the legacy flake8 ci flow and updated docs.
4. The added workflow supports SARIF code scanning reports on github,
example snapshot:

5. Removed `onnxruntime-python-checks-ci-pipeline` as redundant
### 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. -->
Unified linting experience in CI and local.
Replacing https://github.com/microsoft/onnxruntime/pull/14306
---------
Signed-off-by: Justin Chu <justinchu@microsoft.com>
- Use java/gradlew directly in .github/workflows/publish-java-apidocs.yml.
- Remove use of deleted step from tools/ci_build/github/azure-pipelines/android-arm64-v8a-QNN-crosscompile-ci-pipeline.yml.
- Remove Gradle installations and PATH updates from Dockerfiles and scripts. Now Gradle wrapper is used so a system Gradle installation is not needed.
### 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

#### 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. -->
### 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.
### 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. -->
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>