Skip to content

Commit

Permalink
Update ONNX to 1.12 (#11924)
Browse files Browse the repository at this point in the history
Follow-ups that need to happen after this and before the next ORT release:
* Support SequenceMap with #11731
* Support signal ops with #11778

Follow-ups that need to happen after this but don't necessarily need to happen before the release:
* Implement LayerNormalization kernel for opset version 17: #11916

Fixes #11640
  • Loading branch information
garymm authored Jun 22, 2022
1 parent 64f95d4 commit 4bf22e2
Show file tree
Hide file tree
Showing 17 changed files with 1,089 additions and 148 deletions.
14 changes: 7 additions & 7 deletions cgmanifests/generated/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"type": "git",
"git": {
"commitHash": "db78ac1d7716f56fc9f1b030b715f872f93964e4",
"repositoryUrl": "https://github.com/nlohmann/json.git"
"repositoryUrl": "https://github.com/nlohmann/json"
},
"comments": "git submodule at cmake/external/json"
}
Expand Down Expand Up @@ -265,7 +265,7 @@
"type": "git",
"git": {
"commitHash": "436617053d0f39a1019a371c3a9aa599b3cb2cea",
"repositoryUrl": "https://github.com/google/nsync.git"
"repositoryUrl": "https://github.com/google/nsync"
},
"comments": "git submodule at cmake/external/nsync"
}
Expand All @@ -274,8 +274,8 @@
"component": {
"type": "git",
"git": {
"commitHash": "850a81b0b77786bf99ea90580242b084f86a6235",
"repositoryUrl": "https://github.com/onnx/onnx.git"
"commitHash": "f7ee1ac60d06abe8e26c9b6bbe1e3db5286b614b",
"repositoryUrl": "https://github.com/onnx/onnx"
},
"comments": "git submodule at cmake/external/onnx"
}
Expand All @@ -284,7 +284,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "e776aa0275e293707b6a0901e0e8d8a8a3679508",
"commitHash": "0d98dba29d66e93259db7daa53a9327df767a415",
"repositoryUrl": "https://github.com/google/benchmark.git"
},
"comments": "git submodule at cmake/external/onnx/third_party/benchmark"
Expand All @@ -294,7 +294,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "59a2ac2745d8a57ac94c6accced73620d59fb844",
"commitHash": "ffa346860b306c9bbfb341aed9c14c067751feb8",
"repositoryUrl": "https://github.com/pybind/pybind11.git"
},
"comments": "git submodule at cmake/external/onnx/third_party/pybind11"
Expand Down Expand Up @@ -425,7 +425,7 @@
"type": "git",
"git": {
"commitHash": "e8c599bca6c56c44b6730ad93f6abbc9ecd60fc1",
"repositoryUrl": "https://github.com/microsoft/wil.git"
"repositoryUrl": "https://github.com/microsoft/wil"
},
"comments": "git submodule at cmake/external/wil"
}
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/onnx
Submodule onnx updated 1757 files
583 changes: 525 additions & 58 deletions csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/OnnxMl.cs

Large diffs are not rendered by default.

583 changes: 525 additions & 58 deletions csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/OnnxMl.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/OperatorKernels.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Do not modify directly.*
|||[1, 12]|**T** = tensor(float)|
|LSTM|*in* X:**T**<br> *in* W:**T**<br> *in* R:**T**<br> *in* B:**T**<br> *in* sequence_lens:**T1**<br> *in* initial_h:**T**<br> *in* initial_c:**T**<br> *in* P:**T**<br> *out* Y:**T**<br> *out* Y_h:**T**<br> *out* Y_c:**T**|14+|**T** = tensor(double), tensor(float)<br/> **T1** = tensor(int32)|
|||[7, 13]|**T** = tensor(double), tensor(float)<br/> **T1** = tensor(int32)|
|LayerNormalization|*in* X:**T**<br> *in* Scale:**V**<br> *in* B:**V**<br> *out* Y:**V**<br> *out* Mean:**U**<br> *out* InvStdDev:**U**|1+|**T** = tensor(double), tensor(float)<br/> **U** = tensor(double), tensor(float)<br/> **V** = tensor(double), tensor(float)|
|LayerNormalization|*in* X:**T**<br> *in* Scale:**T**<br> *in* B:**T**<br> *out* Y:**T**<br> *out* Mean:**U**<br> *out* InvStdDev:**U**<br><br>or<br><br>*in* X:**T**<br> *in* Scale:**V**<br> *in* B:**V**<br> *out* Y:**V**<br> *out* Mean:**U**<br> *out* InvStdDev:**U**|1+|**T** = tensor(double), tensor(float)<br/> **U** = tensor(double), tensor(float)<br/> **V** = tensor(double), tensor(float)|
|LeakyRelu|*in* X:**T**<br> *out* Y:**T**|16+|**T** = tensor(float)|
|||[6, 15]|**T** = tensor(float)|
|Less|*in* A:**T**<br> *in* B:**T**<br> *out* C:**T1**|13+|**T** = tensor(double), tensor(float), tensor(int32), tensor(int64)<br/> **T1** = tensor(bool)|
Expand Down Expand Up @@ -561,7 +561,7 @@ Do not modify directly.*
|||[1, 12]|**T** = tensor(double), tensor(float), tensor(float16)|
|LSTM|*in* X:**T**<br> *in* W:**T**<br> *in* R:**T**<br> *in* B:**T**<br> *in* sequence_lens:**T1**<br> *in* initial_h:**T**<br> *in* initial_c:**T**<br> *in* P:**T**<br> *out* Y:**T**<br> *out* Y_h:**T**<br> *out* Y_c:**T**|14+|**T** = tensor(double), tensor(float), tensor(float16)<br/> **T1** = tensor(int32)|
|||[7, 13]|**T** = tensor(double), tensor(float), tensor(float16)<br/> **T1** = tensor(int32)|
|LayerNormalization|*in* X:**T**<br> *in* Scale:**V**<br> *in* B:**V**<br> *out* Y:**V**<br> *out* Mean:**U**<br> *out* InvStdDev:**U**|1+|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16)<br/> **U** = tensor(double), tensor(float)<br/> **V** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16)|
|LayerNormalization|*in* X:**T**<br> *in* Scale:**T**<br> *in* B:**T**<br> *out* Y:**T**<br> *out* Mean:**U**<br> *out* InvStdDev:**U**<br><br>or<br><br>*in* X:**T**<br> *in* Scale:**V**<br> *in* B:**V**<br> *out* Y:**V**<br> *out* Mean:**U**<br> *out* InvStdDev:**U**|1+|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16)<br/> **U** = tensor(double), tensor(float)<br/> **V** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16)|
|LeakyRelu|*in* X:**T**<br> *out* Y:**T**|16+|**T** = tensor(double), tensor(float), tensor(float16)|
|||[6, 15]|**T** = tensor(double), tensor(float), tensor(float16)|
|Less|*in* A:**T**<br> *in* B:**T**<br> *out* C:**T1**|13+|**T** = tensor(double), tensor(float), tensor(float16), tensor(int32), tensor(int64), tensor(uint32), tensor(uint64)<br/> **T1** = tensor(bool)|
Expand Down
8 changes: 8 additions & 0 deletions js/web/docs/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ See [Compatibility](../README.md#Compatibility) for a list of the supported plat
| [BatchNormalization](https://github.com/onnx/onnx/blob/master/docs/Operators.md#BatchNormalization) | [7-8](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#BatchNormalization-7), [9-13](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#BatchNormalization-9), [14](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#BatchNormalization-14), [15+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#BatchNormalization-15) |
| [Bernoulli](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Bernoulli) | |
| [BitShift](https://github.com/onnx/onnx/blob/master/docs/Operators.md#BitShift) | |
| [BlackmanWindow](https://github.com/onnx/onnx/blob/master/docs/Operators.md#BlackmanWindow) | |
| [Cast](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Cast) | [6-8](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Cast-6), [9-12](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Cast-9), [13+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Cast-13) |
| [CastLike](https://github.com/onnx/onnx/blob/master/docs/Operators.md#CastLike) | |
| [Ceil](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Ceil) | [6-12](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Ceil-6), [13+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Ceil-13) |
Expand All @@ -39,6 +40,7 @@ See [Compatibility](../README.md#Compatibility) for a list of the supported plat
| [Cos](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Cos) | [7+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Cos-7) |
| [Cosh](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Cosh) | |
| [CumSum](https://github.com/onnx/onnx/blob/master/docs/Operators.md#CumSum) | |
| [DFT](https://github.com/onnx/onnx/blob/master/docs/Operators.md#DFT) | |
| [DepthToSpace](https://github.com/onnx/onnx/blob/master/docs/Operators.md#DepthToSpace) | [1-10](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#DepthToSpace-1), [11-12](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#DepthToSpace-11), [13+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#DepthToSpace-13) |
| [DequantizeLinear](https://github.com/onnx/onnx/blob/master/docs/Operators.md#DequantizeLinear) | |
| [Det](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Det) | |
Expand All @@ -65,6 +67,8 @@ See [Compatibility](../README.md#Compatibility) for a list of the supported plat
| [Greater](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Greater) | [7-8](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Greater-7), [9-12](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Greater-9), [13+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Greater-13) |
| [GreaterOrEqual](https://github.com/onnx/onnx/blob/master/docs/Operators.md#GreaterOrEqual) | |
| [GridSample](https://github.com/onnx/onnx/blob/master/docs/Operators.md#GridSample) | |
| [HammingWindow](https://github.com/onnx/onnx/blob/master/docs/Operators.md#HammingWindow) | |
| [HannWindow](https://github.com/onnx/onnx/blob/master/docs/Operators.md#HannWindow) | |
| [HardSigmoid](https://github.com/onnx/onnx/blob/master/docs/Operators.md#HardSigmoid) | |
| [HardSwish](https://github.com/onnx/onnx/blob/master/docs/Operators.md#HardSwish) | |
| [Hardmax](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Hardmax) | |
Expand All @@ -75,6 +79,7 @@ See [Compatibility](../README.md#Compatibility) for a list of the supported plat
| [IsNaN](https://github.com/onnx/onnx/blob/master/docs/Operators.md#IsNaN) | |
| [LRN](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LRN) | |
| [LSTM](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LSTM) | |
| [LayerNormalization](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LayerNormalization) | |
| [LeakyRelu](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LeakyRelu) | [6-15](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#LeakyRelu-6), [16+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#LeakyRelu-16) |
| [Less](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Less) | [7-8](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Less-7), [9-12](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Less-9), [13+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Less-13) |
| [LessOrEqual](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LessOrEqual) | |
Expand All @@ -91,6 +96,7 @@ See [Compatibility](../README.md#Compatibility) for a list of the supported plat
| [MaxUnpool](https://github.com/onnx/onnx/blob/master/docs/Operators.md#MaxUnpool) | |
| [Mean](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Mean) | |
| [MeanVarianceNormalization](https://github.com/onnx/onnx/blob/master/docs/Operators.md#MeanVarianceNormalization) | |
| [MelWeightMatrix](https://github.com/onnx/onnx/blob/master/docs/Operators.md#MelWeightMatrix) | |
| [Min](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Min) | |
| [Mod](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Mod) | |
| [Mul](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Mul) | [7-12](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Mul-7), [13](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Mul-13), [14+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Mul-14) |
Expand Down Expand Up @@ -134,6 +140,7 @@ See [Compatibility](../README.md#Compatibility) for a list of the supported plat
| [ReverseSequence](https://github.com/onnx/onnx/blob/master/docs/Operators.md#ReverseSequence) | |
| [RoiAlign](https://github.com/onnx/onnx/blob/master/docs/Operators.md#RoiAlign) | |
| [Round](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Round) | |
| [STFT](https://github.com/onnx/onnx/blob/master/docs/Operators.md#STFT) | |
| [Scan](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Scan) | |
| [Scatter](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Scatter) | |
| [ScatterElements](https://github.com/onnx/onnx/blob/master/docs/Operators.md#ScatterElements) | |
Expand All @@ -145,6 +152,7 @@ See [Compatibility](../README.md#Compatibility) for a list of the supported plat
| [SequenceErase](https://github.com/onnx/onnx/blob/master/docs/Operators.md#SequenceErase) | |
| [SequenceInsert](https://github.com/onnx/onnx/blob/master/docs/Operators.md#SequenceInsert) | |
| [SequenceLength](https://github.com/onnx/onnx/blob/master/docs/Operators.md#SequenceLength) | |
| [SequenceMap](https://github.com/onnx/onnx/blob/master/docs/Operators.md#SequenceMap) | |
| [Shape](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Shape) | [1-12](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Shape-1), [13-14](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Shape-13), [15+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Shape-15) |
| [Shrink](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Shrink) | |
| [Sigmoid](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Sigmoid) | [6-12](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Sigmoid-6), [13+](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Sigmoid-13) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ class GraphRef {
} // namespace api

constexpr int64_t kMinSupportedOpset = 7;
constexpr int64_t kMaxSupportedOpset = 16;
constexpr int64_t kMaxSupportedOpset = 17;

enum class OptimizerMode {
OPTIMIZE_TRANSPOSE, // simple transpose optimization
Expand Down
9 changes: 5 additions & 4 deletions onnxruntime/test/python/transformers/bert_model_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@ def create_bert_attention(
initializers,
)

model = helper.make_model(graph)
return model
# Needed so that we don't see the new LayerNormalization function added in version 17.
# TODO(https://github.com/microsoft/onnxruntime/issues/11916): Remove once fixed.
opsetid = helper.make_opsetid("ai.onnx", min(onnx.defs.onnx_opset_version(), 16))
return helper.make_model(graph, opset_imports=(opsetid,))


def create_tf2onnx_attention_3d(input_hidden_size=16, num_heads=4, head_size=4, use_float_mask=False):
Expand Down Expand Up @@ -414,8 +416,7 @@ def create_tf2onnx_attention_3d(input_hidden_size=16, num_heads=4, head_size=4,
initializers,
)

model = helper.make_model(graph)
return model
return helper.make_model(graph)


if __name__ == "__main__":
Expand Down
6 changes: 4 additions & 2 deletions onnxruntime/test/python/transformers/gpt2_model_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,10 @@ def create_gpt2_attention(hidden_size=64, num_heads=4, max_seq_len=32, switch_ad
initializers,
)

model = helper.make_model(graph)
return model
# Needed so that we don't see the new LayerNormalization function added in version 17.
# TODO(https://github.com/microsoft/onnxruntime/issues/11916): Remove once fixed.
opsetid = helper.make_opsetid("ai.onnx", min(onnx.defs.onnx_opset_version(), 16))
return helper.make_model(graph, opset_imports=(opsetid,))


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//
// Tests that are failing temporarily and should be fixed
"current_failing_tests": [
"^test_(blackmanwindow|dft|hammingwindow|hannwindow|melweightmatrix|stft).*", // https://github.com/microsoft/onnxruntime/pull/11778
"^test_sequence_map.*", // https://github.com/microsoft/onnxruntime/pull/11731
"^test_adagrad",
"^test_adagrad_multiple",
"^test_batchnorm_epsilon_old",
Expand Down
3 changes: 1 addition & 2 deletions tools/ci_build/github/azure-pipelines/linux-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ jobs:
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml onnx -qq
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt $(Build.BinariesDirectory)/requirements.txt
# Test ORT with the latest ONNX release.
export ONNX_VERSION=$(cat $(Build.SourcesDirectory)/cmake/external/onnx/VERSION_NUMBER)
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx==$ONNX_VERSION/" $(Build.BinariesDirectory)/requirements.txt
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx/" $(Build.BinariesDirectory)/requirements.txt
python3 -m pip install -r $(Build.BinariesDirectory)/requirements.txt
mkdir $(Build.BinariesDirectory)/requirements_torch_cpu/
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/training/ortmodule/stage1/requirements_torch_cpu/requirements.txt $(Build.BinariesDirectory)/requirements_torch_cpu/requirements.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ jobs:
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml onnx -qq
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt $(Build.BinariesDirectory)/requirements.txt
# Test ORT with the latest ONNX release.
export ONNX_VERSION=$(cat $(Build.SourcesDirectory)/cmake/external/onnx/VERSION_NUMBER)
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx==$ONNX_VERSION/" $(Build.BinariesDirectory)/requirements.txt
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx/" $(Build.BinariesDirectory)/requirements.txt
python3 -m pip install -r $(Build.BinariesDirectory)/requirements.txt
python3 -m pip install $(Build.BinariesDirectory)/Release/dist/*.whl
ln -s /data/models $(Build.BinariesDirectory)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ jobs:
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml onnx -qq
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt $(Build.BinariesDirectory)/requirements.txt
# Test ORT with the latest ONNX release.
export ONNX_VERSION=$(cat $(Build.SourcesDirectory)/cmake/external/onnx/VERSION_NUMBER)
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx==$ONNX_VERSION/" $(Build.BinariesDirectory)/requirements.txt
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx/" $(Build.BinariesDirectory)/requirements.txt
#Do not explicitly specify numpy version as this is not a packaging pipeline, any version should be ok
sed -i "/^numpy/d" $(Build.BinariesDirectory)/requirements.txt
python3 -m pip install -r $(Build.BinariesDirectory)/requirements.txt
Expand Down Expand Up @@ -115,4 +114,4 @@ jobs:
testRunTitle: 'Unit Test Run'
condition: succeededOrFailed()

- template: templates/clean-agent-build-directory-step.yml
- template: templates/clean-agent-build-directory-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,7 @@ stages:
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml -qq
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt $(Build.BinariesDirectory)/requirements.txt
# Test ORT with the latest ONNX release.
export ONNX_VERSION=$(cat $(Build.SourcesDirectory)/cmake/external/onnx/VERSION_NUMBER)
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx==$ONNX_VERSION/" $(Build.BinariesDirectory)/requirements.txt
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx/" $(Build.BinariesDirectory)/requirements.txt
python3 -m pip install -r $(Build.BinariesDirectory)/requirements.txt
python3 -m pip install $(Build.BinariesDirectory)/Release/dist/*.whl
cd $(Build.BinariesDirectory)/Release
Expand Down
Loading

0 comments on commit 4bf22e2

Please sign in to comment.