the following is the logs when debug=
the following is the logs when debug=True is added during the langfuse object instantiation in the code snippet
Scores still are not received by the langfuse server.
Evaluating: 100%|██████████| 2/2 [00:09<00:00, 4.69s/it]240a5f73e468d5407fd)
[2024-02-12T15:10:05+05:30] (ecs/nlq-worker/15e524848f864240a5f73e468d5407fd) DEBUG:langfuse:Creating score {'id': '5c8c6162-4e07-4b9a-b12c-0f632d93fc1f', 'trace_id': '8885ab98-9d0e-446e-9382-7e7ee23c697d', 'observation_id': None, 'name': 'faithfulness', 'value': 1.0, 'comment': None}...
[2024-02-12T15:10:05+05:30] (ecs/nlq-worker/15e524848f864240a5f73e468d5407fd) DEBUG:langfuse:adding task {'id': 'bab13882-c5c2-42c9-a17f-eaa671efda3c', 'type': 'score-create', 'body': {'id': '5c8c6162-4e07-4b9a-b12c-0f632d93fc1f', 'traceId': '8885ab98-9d0e-446e-9382-7e7ee23c697d', 'name': 'faithfulness', 'value': 1.0}}
[2024-02-12T15:10:05+05:30] (ecs/nlq-worker/15e524848f864240a5f73e468d5407fd) DEBUG:langfuse:Creating score {'id': 'cf5de274-236e-4ceb-b712-e3abbc92a1fa', 'trace_id': '8885ab98-9d0e-446e-9382-7e7ee23c697d', 'observation_id': None, 'name': 'context_relevancy', 'value': 0.56, 'comment': None}...
[2024-02-12T15:10:05+05:30] (ecs/nlq-worker/15e524848f864240a5f73e468d5407fd) DEBUG:langfuse:adding task {'id': 'f6742f8a-89ae-413e-8f34-f44f14bfd2b6', 'type': 'score-create', 'body': {'id': 'cf5de274-236e-4ceb-b712-e3abbc92a1fa', 'traceId': '8885ab98-9d0e-446e-9382-7e7ee23c697d', 'name': 'context_relevancy', 'value': 0.56}}
1 Reply
Through further debugging i understand that the error is caused because of the TaskManager in Langfuse not creating threads and sending requests
Below is the logs that should have been seen if successful (which is missing in my ECS service)
DEBUG:langfuse:item size 239
DEBUG:langfuse:joining 1 consumer threads
DEBUG:langfuse:uploading batch of 2 items
DEBUG:langfuse:making request: {"batch": [{"id": "7f9b82e1-260f-41df-9638-1419c09df678", "type": "score-create", "body": {"id": "489af865-52dd-4466-ad73-19f1a193d201", "traceId": "brrrrrruuur", "name": "faithfulness", "value": 1.0}, "timestamp": "2024-02-12T09:49:48.768478Z"}, {"id": "98a501d5-d51b-4b79-b8b8-1864b0978f62", "type": "score-create", "body": {"id": "1f974df8-f288-41e3-944c-d228f0fb0e9b", "traceId": "brrrrrruuur", "name": "context_relevancy", "value": 0.0}, "timestamp": "2024-02-12T09:49:48.768811Z"}], "metadata": {"batch_size": 2, "sdk_integration": "default", "sdk_name": "python", "sdk_version": "2.9.0", "public_key": "pk-lf-071f366b-0f9a-4066-9d11-feb72b49e45f"}} to http://langfuse-258775943.eu-west-1.elb.amazonaws.com/api/public/ingestion
DEBUG:langfuse:received response: {"errors":[],"successes":[{"id":"7f9b82e1-260f-41df-9638-1419c09df678","status":201},{"id":"98a501d5-d51b-4b79-b8b8-1864b0978f62","status":201}]}
DEBUG:langfuse:successfully uploaded batch of 2 items
DEBUG:langfuse:consumer thread 0 joined
What could be reason for the TaskManager to not be able to join threads and make the api request?
My ECS task definition alots the following cpu and memory reservation for this task
"cpu": 1024,
"memoryReservation": 1000,