group-wbl/.venv/lib/python3.13/site-packages/onnxruntime/datasets/__init__.py
2026-01-09 09:48:03 +08:00

19 lines
455 B
Python

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""
Short examples used in the documentation.
"""
import os
def get_example(name):
"""
Retrieves the absolute file name of an example.
"""
this = os.path.abspath(os.path.dirname(__file__))
full = os.path.join(this, name)
if not os.path.exists(full):
raise FileNotFoundError(f"Unable to find example '{name}'")
return full