Lambda gets runtime error while another Lambda is working fine

0

I'm trying to do edge ML using Docker container in Jetson nano. GG Core runs in the Docker container(aarch64/ubuntuOS based).

I deployed GGG with 2 Lambda functions. One just sends 'Hello' MQTT message to IoT Core, another does inference using local ML model. Both Lambda functions are deployed with same UID/GID(0), and same container configuration(Use group default (currently: No container)), and both on-demand.

I succeeded the deployment, and Hello Lambda works fine, but the inference Lambda gives me a runtime error like below. I don't know why only one Lambda gives me a runtime error. I also made sure the '<python file name>.<function name>' syntax of Lambda. Plus both runtime are set as Python3.7.

Thank you in advance.

########################################################################
[2021-06-04T18:33:40.833+09:00][INFO]-phone_home.py:126,
[2021-06-04T18:33:40.837+09:00][WARN]-ipc_client.py:163,deprecated arg port=8000 will be ignored
[2021-06-04T18:33:40.868+09:00][ERROR]-init.py:1028,2021-06-04 18:33:40,839 INFO Could not find libdlr.so in model artifact. Using dlr from /usr/local/lib/python3.7/dist-packages/dlr-1.6.0-py3.7.egg/dlr/libdlr.so
[2021-06-04T18:33:40.897+09:00][FATAL]-lambda_runtime.py:142,Failed to import handler function "inference.handler" due to exception:
[2021-06-04T18:33:42.293+09:00][INFO]- You acknowledge and agree that DLR collects the following metrics to help improve its performance.
[2021-06-04T18:33:42.293+09:00][INFO]- You acknowledge and agree that DLR collects the following metrics to help improve its performance.
[2021-06-04T18:33:42.293+09:00][INFO]- CALL HOME FEATURE ENABLED
[2021-06-04T18:33:43.093+09:00][INFO]-
[2021-06-04T18:33:43.225+09:00][INFO]-phone_home.py:126,
[2021-06-04T18:33:43.228+09:00][WARN]-ipc_client.py:163,deprecated arg port=8000 will be ignored
[2021-06-04T18:33:43.26+09:00][ERROR]-init.py:1028,2021-06-04 18:33:43,230 INFO Could not find libdlr.so in model artifact. Using dlr from /usr/local/lib/python3.7/dist-packages/dlr-1.6.0-py3.7.egg/dlr/libdlr.so
[2021-06-04T18:33:43.29+09:00][FATAL]-lambda_runtime.py:142,Failed to import handler function "inference.handler" due to exception:
[2021-06-04T18:33:44.294+09:00][INFO]- CALL HOME FEATURE ENABLED
[2021-06-04T18:33:45.543+09:00][INFO]-phone_home.py:126,
[2021-06-04T18:33:45.546+09:00][WARN]-ipc_client.py:163,deprecated arg port=8000 will be ignored
[2021-06-04T18:33:45.578+09:00][ERROR]-init.py:1028,2021-06-04 18:33:45,549 INFO Could not find libdlr.so in model artifact. Using dlr from /usr/local/lib/python3.7/dist-packages/dlr-1.6.0-py3.7.egg/dlr/libdlr.so
[2021-06-04T18:33:45.611+09:00][FATAL]-lambda_runtime.py:142,Failed to import handler function "inference.handler" due to exception:
[2021-06-04T18:33:46.31+09:00][INFO]- record_type: <enum, internal record status, such as model_loaded, model_>,

Edited by: hdmn54321 on Jun 4, 2021 4:08 AM

Edited by: hdmn54321 on Jun 4, 2021 4:13 AM

asked 3 years ago288 views
2 Answers
0

Hi,
Are you able to run the same python code outside of greengrass using python 3.7?

answered 3 years ago
0

The problem was solved. I had 2 reasons below.

  1. I downloaded wrong DLR ML model (It's for x86_64. It' supposed to be aarch64)

  2. The default Lambda script is wrong

In the default Lambda, it's basically

synset_path = 'synset.txt'

So I changed it to

synset_path = model_resource_path + '/synset.txt'

and it worked.

Thanks as always:)

HM

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions