Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.source
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN cd /code && /bin/bash ./build.sh --allow_running_as_root --skip_submodule_sy
FROM mcr.microsoft.com/azurelinux/base/python:3
COPY --from=0 /code/build/Linux/Release/dist /root
COPY --from=0 /code/dockerfiles/LICENSE-IMAGE.txt /code/LICENSE-IMAGE.txt
RUN tdnf install -y ca-certificates python3-setuptools python3-wheel python3-pip python3-numpy python3-flatbuffers python3-packaging python3-protobuf python3-mpmath python3-sympy && python3 -m pip install coloredlogs humanfriendly && python3 -m pip install --no-index --find-links /root onnxruntime && rm -rf /root/*.whl
RUN tdnf install -y ca-certificates python3-setuptools python3-wheel python3-pip python3-numpy python3-flatbuffers python3-packaging python3-protobuf python3-mpmath python3-sympy && python3 -m pip install humanfriendly && python3 -m pip install --no-index --find-links /root onnxruntime && rm -rf /root/*.whl
1 change: 0 additions & 1 deletion docs/python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ furo
pyquickhelper
pandas
pydot
coloredlogs
flatbuffers
numpy<2.0.0
packaging
Expand Down
10 changes: 5 additions & 5 deletions onnxruntime/python/tools/tensorrt/perf/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import timeit
from datetime import datetime

import coloredlogs
import numpy as np
from perf_utils import (
acl,
Expand Down Expand Up @@ -2259,12 +2258,13 @@ def parse_arguments():

def setup_logger(verbose):
if verbose:
coloredlogs.install(
level="DEBUG",
fmt="[%(filename)s:%(lineno)s - %(funcName)20s()] %(message)s",
logging.basicConfig(
level=logging.DEBUG,
format="[%(filename)s:%(lineno)s - %(funcName)20s()] %(message)s",
force=True,
)
else:
coloredlogs.install(fmt="%(message)s")
logging.basicConfig(format="%(message)s", force=True)
logging.getLogger("transformers").setLevel(logging.WARNING)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import pprint
import re

import coloredlogs # noqa: F401
from benchmark import * # noqa: F403
from perf_utils import * # noqa: F403

Expand Down
2 changes: 0 additions & 2 deletions onnxruntime/python/tools/tensorrt/perf/perf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import subprocess
import sys

import coloredlogs # noqa: F401

debug = False
debug_verbose = False

Expand Down
1 change: 0 additions & 1 deletion onnxruntime/python/tools/tensorrt/perf/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
onnxconverter-common
onnxmltools
pandas
coloredlogs
9 changes: 4 additions & 5 deletions onnxruntime/python/tools/transformers/benchmark_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from time import sleep
from typing import Any

import coloredlogs
import numpy
import torch
import transformers
Expand Down Expand Up @@ -147,12 +146,12 @@ def create_onnxruntime_session(

def setup_logger(verbose=True):
if verbose:
coloredlogs.install(
level="DEBUG",
fmt="[%(filename)s:%(lineno)s - %(funcName)20s()] %(message)s",
logging.basicConfig(
format="[%(filename)s:%(lineno)s - %(funcName)20s()] %(message)s",
level=logging.DEBUG,
)
else:
coloredlogs.install(fmt="%(message)s")
logging.basicConfig(format="%(message)s", level=logging.INFO)
logging.getLogger("transformers").setLevel(logging.WARNING)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import logging
import os

import coloredlogs
from constants import (
AttentionInputIDs,
AttentionOutputIDs,
Expand Down Expand Up @@ -358,12 +357,12 @@ def _parse_arguments():

def _setup_logger(verbose):
if verbose:
coloredlogs.install(
level="DEBUG",
fmt="[%(filename)s:%(lineno)s - %(funcName)20s()] %(message)s",
logging.basicConfig(
format="[%(filename)s:%(lineno)s - %(funcName)20s()] %(message)s",
level=logging.DEBUG,
)
else:
coloredlogs.install(fmt="%(funcName)20s: %(message)s")
logging.basicConfig(format="%(funcName)20s: %(message)s", level=logging.INFO)


def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# conda create -n gpu_env python=3.8
# conda activate gpu_env
# pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
# pip3 install onnx transformers onnxruntime-gpu numpy sympy coloredlogs psutil py3nvml
# pip3 install onnx transformers onnxruntime-gpu numpy sympy psutil py3nvml
# python benchmark_longformer.py
#
# When there is no parameter, pre-defined tests will run on the longformer-base-4096 model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# conda create -n longformer python=3.8
# conda activate longformer
# python3 -m pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
# python3 -m pip install coloredlogs flatbuffers numpy packaging sympy protobuf==3.20.1 onnx==1.12.0 transformers==4.18.0
# python3 -m pip install flatbuffers numpy packaging sympy protobuf==3.20.1 onnx==1.12.0 transformers==4.18.0
# python3 -m pip install -i https://test.pypi.org/simple/ ort-nightly-gpu
# cd ./torch_extensions
# rm -rf build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@

import argparse
import csv
import logging
import os
import statistics
import sys
import time
from pathlib import Path

import coloredlogs

# import torch before onnxruntime so that onnxruntime uses the cuDNN in the torch package.
import torch
from benchmark_helper import measure_memory
Expand Down Expand Up @@ -1332,7 +1331,7 @@ def main():
if version.parse(ort_version) < version.parse("1.16"):
raise ValueError("CUDA graph requires ONNX Runtime 1.16 or later")

coloredlogs.install(fmt="%(funcName)20s: %(message)s")
logging.basicConfig(format="%(funcName)20s: %(message)s", level=logging.INFO, force=True)

memory_monitor_type = "cuda"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
# limitations under the License.
# --------------------------------------------------------------------------

import coloredlogs
import logging

from cuda import cudart
from demo_utils import (
add_controlnet_arguments,
Expand Down Expand Up @@ -86,7 +87,7 @@ def run_inference(warmup=False):


if __name__ == "__main__":
coloredlogs.install(fmt="%(funcName)20s: %(message)s")
logging.basicConfig(format="%(funcName)20s: %(message)s", level=logging.INFO)

parser = arg_parser("Options for Stable Diffusion Demo")
add_controlnet_arguments(parser)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
# limitations under the License.
# --------------------------------------------------------------------------

import coloredlogs
import logging

from cuda import cudart
from demo_utils import (
add_controlnet_arguments,
Expand Down Expand Up @@ -252,7 +253,7 @@ def main(args):


if __name__ == "__main__":
coloredlogs.install(fmt="%(funcName)20s: %(message)s")
logging.basicConfig(format="%(funcName)20s: %(message)s", level=logging.INFO)

parser = arg_parser("Options for Stable Diffusion XL Demo")
add_controlnet_arguments(parser)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import tempfile
from pathlib import Path

import coloredlogs
import onnx
from fusion_options import FusionOptions
from onnx_model_clip import ClipOnnxModel
Expand Down Expand Up @@ -580,5 +579,5 @@ def main(argv: list[str] | None = None):


if __name__ == "__main__":
coloredlogs.install(fmt="%(funcName)20s: %(message)s")
logging.basicConfig(format="%(funcName)20s: %(message)s", level=logging.INFO)
main()
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ transformers==4.50.0
numpy>=1.24.1
accelerate
onnx==1.18.0
coloredlogs
packaging
# Use newer version of protobuf might cause crash
protobuf==4.25.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"else:\n",
" !{sys.executable} -m pip install install torch --index-url https://download.pytorch.org/whl/cpu -q\n",
"\n",
"!{sys.executable} -m pip install onnxruntime transformers==4.18 onnx psutil pandas py-cpuinfo py3nvml netron coloredlogs --no-warn-script-location -q"
"!{sys.executable} -m pip install onnxruntime transformers==4.18 onnx psutil pandas py-cpuinfo py3nvml netron --no-warn-script-location -q"
]
},
{
Expand Down Expand Up @@ -719,4 +719,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"\n",
"if sys.platform in ['linux', 'win32']: # Linux or Windows\n",
" !{sys.executable} -m pip install torch --index-url https://download.pytorch.org/whl/cu118 -q\n",
" !{sys.executable} -m pip install onnxruntime-gpu onnx transformers psutil pandas py-cpuinfo py3nvml coloredlogs wget netron sympy protobuf==3.20.3 -q\n",
" !{sys.executable} -m pip install onnxruntime-gpu onnx transformers psutil pandas py-cpuinfo py3nvml wget netron sympy protobuf==3.20.3 -q\n",
"else: # Mac\n",
" print(\"CUDA is not available on MacOS\")"
]
Expand Down Expand Up @@ -196,9 +196,9 @@
"Some weights of the model checkpoint at bert-large-uncased-whole-word-masking-finetuned-squad were not used when initializing BertForQuestionAnswering: ['bert.pooler.dense.bias', 'bert.pooler.dense.weight']\n",
"- This IS expected if you are initializing BertForQuestionAnswering from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
"- This IS NOT expected if you are initializing BertForQuestionAnswering from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
"100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 48/48 [00:02<00:00, 16.27it/s]\n",
"convert squad examples to features: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:03<00:00, 256.11it/s]\n",
"add example index and unique id: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:00<?, ?it/s]\n"
"100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 48/48 [00:02<00:00, 16.27it/s]\n",
"convert squad examples to features: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:03<00:00, 256.11it/s]\n",
"add example index and unique id: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<?, ?it/s]\n"
]
}
],
Expand Down Expand Up @@ -1969,4 +1969,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
"cell_type": "code",
"execution_count": 11,
"source": [
"!{sys.executable} -m pip install --quiet coloredlogs sympy \n",
"!{sys.executable} -m pip install --quiet sympy \n",
"\n",
"optimized_model_path = os.path.join(output_dir, 'tf2onnx_{}_opt_cpu.onnx'.format(model_name_or_path))\n",
"\n",
Expand Down Expand Up @@ -729,4 +729,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
8 changes: 3 additions & 5 deletions onnxruntime/python/tools/transformers/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import tempfile
from pathlib import Path

import coloredlogs
from fusion_options import FusionOptions
from onnx import ModelProto, load_model
from onnx_model import OnnxModel
Expand Down Expand Up @@ -562,12 +561,11 @@ def _parse_arguments():

def _setup_logger(verbose):
if verbose:
coloredlogs.install(
level="DEBUG",
fmt="[%(filename)s:%(lineno)s - %(funcName)20s()] %(message)s",
logging.basicConfig(
format="[%(filename)s:%(lineno)s - %(funcName)20s()] %(message)s", level=logging.DEBUG, force=True
)
else:
coloredlogs.install(fmt="%(funcName)20s: %(message)s")
logging.basicConfig(format="%(funcName)20s: %(message)s", level=logging.INFO, force=True)
Comment thread
tianleiwu marked this conversation as resolved.


def main():
Expand Down
1 change: 0 additions & 1 deletion onnxruntime/python/tools/transformers/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
onnx >= 1.8
numpy >= 1.19.0
coloredlogs
psutil
py-cpuinfo
py3nvml
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/transformers/run_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
# export CUDA_VISIBLE_DEVICES=1

# This script will generate a logs file with a list of commands used in tests.
echo echo "ort=$run_ort torch=$run_torch torch2=$run_torch2 torchscript=$run_torchscript tensorflow=$run_tensorflow gpu_fp32=$run_gpu_fp32 gpu_fp16=$run_gpu_fp16 cpu=$run_cpu optimizer=$use_optimizer batch=$batch_sizes sequence=$sequence_length models=$models_to_test" arm64_bfloat16_fastmath_mode=$arm64_bfloat16_fastmath_mode >> benchmark.log

Check warning on line 66 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 sequence_length is referenced but not assigned (did you mean 'sequence_lengths'?). Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:66:229: warning: sequence_length is referenced but not assigned (did you mean 'sequence_lengths'?). (ShellCheck.SC2154)

Check warning on line 66 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 run_cpu is referenced but not assigned. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:66:167: warning: run_cpu is referenced but not assigned. (ShellCheck.SC2154)

# Set it to false to skip testing. You can use it to dry run this script with the log file.
run_tests=true
Expand Down Expand Up @@ -95,7 +95,7 @@
else
pip install onnxruntime-gpu
fi
pip install --upgrade onnx coloredlogs packaging psutil py3nvml numpy transformers sympy
pip install --upgrade onnx packaging psutil py3nvml numpy transformers sympy
fi

if [ "$use_package" = true ] ; then
Expand Down Expand Up @@ -133,8 +133,8 @@
# -------------------------------------------
run_one_test() {
if [ "$run_ort" = true ] ; then
echo python $benchmark_script -m $1 $onnx_export_options $2 $3 $4 >> benchmark.log

Check warning on line 136 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:136:70: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 136 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:136:67: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 136 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:136:64: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 136 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:136:43: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 136 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:136:40: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 136 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:136:19: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
echo python $benchmark_script -m $1 $benchmark_options $2 $3 $4 -i $input_counts >> benchmark.log

Check warning on line 137 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:137:40: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 137 in onnxruntime/python/tools/transformers/run_benchmark.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./onnxruntime/python/tools/transformers/run_benchmark.sh:137:19: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
if [ "$run_tests" = true ] ; then
python $benchmark_script -m $1 $onnx_export_options $2 $3 $4
python $benchmark_script -m $1 $benchmark_options $2 $3 $4 -i $input_counts
Expand Down
3 changes: 1 addition & 2 deletions onnxruntime/test/python/transformers/test_gpt2_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import os
import unittest

import coloredlogs
import pytest
from parity_utilities import find_transformers_source

Expand Down Expand Up @@ -50,6 +49,6 @@ def test_gpt2_int8(self):


if __name__ == "__main__":
coloredlogs.install(fmt="%(message)s")
logging.basicConfig(format="%(message)s")
logging.getLogger("transformers").setLevel(logging.ERROR)
unittest.main()
3 changes: 1 addition & 2 deletions onnxruntime/test/python/transformers/test_gpt2_to_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import logging
import unittest

import coloredlogs
import pytest
from parity_utilities import find_transformers_source

Expand Down Expand Up @@ -58,6 +57,6 @@ def test_auto_mixed_precision(self):


if __name__ == "__main__":
coloredlogs.install(fmt="%(message)s")
logging.basicConfig(format="%(message)s")
logging.getLogger("transformers").setLevel(logging.ERROR)
unittest.main()
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
coloredlogs
flatbuffers
numpy >= 1.21.6
packaging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/'
condition: always()

- script: 'python3 -m pip install pandas azure-kusto-data[pandas] azure-kusto-ingest[pandas] coloredlogs'
- script: 'python3 -m pip install pandas azure-kusto-data[pandas] azure-kusto-ingest[pandas]'
displayName: 'Install dashboard dependencies'

- script: |
Expand All @@ -165,7 +165,7 @@ jobs:

- ${{ if eq(parameters.PostToDashboard, true) }}:

- script: 'python3 -m pip install pandas azure-kusto-data[pandas] azure-kusto-ingest[pandas] coloredlogs'
- script: 'python3 -m pip install pandas azure-kusto-data[pandas] azure-kusto-ingest[pandas]'
displayName: 'Install dashboard dependencies'

- script: |
Expand All @@ -191,4 +191,4 @@ jobs:
pathtoPublish: '$(Build.SourcesDirectory)/Artifact'
artifactName: 'result-$(Build.BuildNumber)'

- 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 @@ -54,7 +54,7 @@ jobs:
FILE_NAME="${files[0]}"
FILE_NAME=$(basename $FILE_NAME)
PYTHON_PACKAGE_NAME=$(echo "$FILE_NAME" | cut -f 1 -d '-')
python3 -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy
python3 -m pip install flatbuffers numpy packaging protobuf sympy
python3 -m pip install --no-index --find-links . $PYTHON_PACKAGE_NAME
python3 -m pip show $PYTHON_PACKAGE_NAME
python3 -c "import onnxruntime as ort; print(ort.__version__)"
Expand Down
1 change: 0 additions & 1 deletion tools/ci_build/github/windows/python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ jinja2
markupsafe
semver
packaging
coloredlogs
onnx==1.20.1; python_version < "3.14"
Loading
Loading