Skip to content

Commit

Permalink
Merge pull request #562 from roboflow/documentation-for-ONNXRUNTIME_E…
Browse files Browse the repository at this point in the history
…XECUTION_PROVIDERS

Add documentation for ONNXRUNTIME_EXECUTION_PROVIDERS
  • Loading branch information
grzegorz-roboflow authored Aug 5, 2024
2 parents ecdfe11 + ac2422d commit 04da966
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/server_configuration/environmental_variables.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion inference/core/models/roboflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ 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:
- Inference API Reference: docs/reference/
Expand Down

0 comments on commit 04da966

Please sign in to comment.