From 9340c7f763defc20ac9fc3121716d6e08bb6da62 Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:39:33 +0200 Subject: [PATCH 1/4] Add documentation for ONNXRUNTIME_EXECUTION_PROVIDERS --- inference/core/models/roboflow.py | 7 +++++-- mkdocs.yml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/inference/core/models/roboflow.py b/inference/core/models/roboflow.py index 791b6a2f0..8cffdd09c 100644 --- a/inference/core/models/roboflow.py +++ b/inference/core/models/roboflow.py @@ -414,7 +414,7 @@ def preproc_image( resized = letterbox_image( preprocessed_image, (self.img_size_w, self.img_size_h), - color=(114, 114, 114), + color=(32, 32, 32), ) if is_bgr: @@ -726,7 +726,10 @@ def initialize_model(self) -> None: for provider in REQUIRED_ONNX_PROVIDERS: if provider not in available_providers: raise OnnxProviderNotAvailable( - f"Required ONNX Execution Provider {provider} is not availble. Check that you are using the correct docker image on a supported device." + f"Required ONNX Execution Provider {provider} is not availble. " + "Check that you are using the correct docker image on a supported device. " + "Export list of available providers as ONNXRUNTIME_EXECUTION_PROVIDERS environmental variable, " + "consult documentation for more details." ) inputs = self.onnx_session.get_inputs()[0] diff --git a/mkdocs.yml b/mkdocs.yml index 799e912d7..ab3c57197 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -93,6 +93,7 @@ nav: - Inference CLI: inference_helpers/inference_cli.md - Inference SDK: inference_helpers/inference_sdk.md - Server configuration: + - Environmental variables: server_configuration/environmental_variables.md - Security of input formats: server_configuration/accepted_input_formats.md - Reference: - Inference API Reference: docs/reference/ From 02aa3944f8016303b347a29aa5bfb2716edbda40 Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:45:46 +0200 Subject: [PATCH 2/4] Update heading --- inference/core/models/roboflow.py | 2 +- mkdocs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inference/core/models/roboflow.py b/inference/core/models/roboflow.py index 8cffdd09c..5a28b3821 100644 --- a/inference/core/models/roboflow.py +++ b/inference/core/models/roboflow.py @@ -414,7 +414,7 @@ def preproc_image( resized = letterbox_image( preprocessed_image, (self.img_size_w, self.img_size_h), - color=(32, 32, 32), + color=(114, 114, 114), ) if is_bgr: diff --git a/mkdocs.yml b/mkdocs.yml index ab3c57197..b2098be66 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -92,7 +92,7 @@ nav: - Inference Landing Page: inference_helpers/inference_landing_page.md - Inference CLI: inference_helpers/inference_cli.md - Inference SDK: inference_helpers/inference_sdk.md - - Server configuration: + - inference configuration:: - Environmental variables: server_configuration/environmental_variables.md - Security of input formats: server_configuration/accepted_input_formats.md - Reference: From 67029bebe882079790c88fc02babbe53fb3dd6c2 Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:28:28 +0200 Subject: [PATCH 3/4] Add 'environmental_variables.md' --- docs/server_configuration/environmental_variables.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/server_configuration/environmental_variables.md diff --git a/docs/server_configuration/environmental_variables.md b/docs/server_configuration/environmental_variables.md new file mode 100644 index 000000000..d9a1574b6 --- /dev/null +++ b/docs/server_configuration/environmental_variables.md @@ -0,0 +1,9 @@ +# Environmental vaiables + +`Inference` behavior can be controlled by set of environmental variables. All environmental variables are listed in [inference/core/env.py](inference/core/env.py) + +Below is a list of some environmental values that require more in-depth explanation. + +Environmental variable | Default | Description +------------------------------------------ | ------------------------------------------------------------------------ | ----------- +ONNXRUNTIME_EXECUTION_PROVIDERS | "[CUDAExecutionProvider,OpenVINOExecutionProvider,CPUExecutionProvider]" | List of execution providers in priority order, warning message will be displayed if provider is not supported on user platform From ac2422dc758c70b15681ec08f028f16f3f15b276 Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:30:22 +0200 Subject: [PATCH 4/4] formatting --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index b2098be66..f36d622c6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -92,7 +92,7 @@ nav: - Inference Landing Page: inference_helpers/inference_landing_page.md - Inference CLI: inference_helpers/inference_cli.md - Inference SDK: inference_helpers/inference_sdk.md - - inference configuration:: + - inference configuration: - Environmental variables: server_configuration/environmental_variables.md - Security of input formats: server_configuration/accepted_input_formats.md - Reference: