Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONNX Runtime Exception: Attempt to Use DefaultLogger Without Registration on Python 3.12 Lambda Container #435

Open
InshaManowar opened this issue Jan 8, 2025 · 0 comments

Comments

@InshaManowar
Copy link

What happened?

I encountered a critical issue when using onnxruntime==1.19.2 in the AWS Lambda Python 3.12 container (public.ecr.aws/lambda/python:3.12). The error is as follows:

terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException'
what():  /onnxruntime_src/include/onnxruntime/core/common/logging/logging.h:340 static const onnxruntime::logging::Logger& onnxruntime::logging::LoggingManager::DefaultLogger() Attempt to use DefaultLogger but none has been registered.

I attempted to resolve this by explicitly initializing the default logger in Python code:

import onnxruntime as ort
ort.set_default_logger()

What is the expected behaviour?

No response

A minimal reproducible example

Use the onnxruntime==1.19.2 library in a Docker image based on public.ecr.aws/lambda/python:3.12.
Run any script that initializes an ONNX Runtime session (e.g., ort.InferenceSession).
Observe the error indicating an unregistered DefaultLogger.

What Python version are you on? e.g. python --version

ONNX Runtime Version: 1.19.2
Python Version: 3.12
Docker Image: public.ecr.aws/lambda/python:3.12
Operating System: AWS Lambda Runtime

FastEmbed version

v0.5.0

What os are you seeing the problem on?

Linux

Relevant stack traces and/or logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant