HumanSignal / HumanSignal/label-studio

ML Backend Error

Open
#1,874 4 comments 0 reactions 1 assignee Claimed by @makseq View on GitHub
configuration ML problem
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

I wanted to do Named Entity Recognition in labelstudio on AWS ECS instance. For this approach, I have used Label Studio as front end and Ginza server as ML backend and using PostgreSQL as database. According to all default setting, I have two containers that are running. (Label studio on port 8080, Ginza Server on 9090 & PostgreSQL using endpoint of AWS RDS). I did health check on Ginza Server and it is showing status UP.
Error Replication:
Step 1: Create Project>Labeling Setup > Natural Language Processing > NER and save.
Step 2: Click on Setting > Machine Learning > Add Model > (Title: random, Description: random, URL: http://:9090/) > Validate and Save. The following error is displayed on the server log:

`rest_framework.exceptions.ValidationError: {'non_field_errors': [ErrorDetail(string="Successfully connected to http://xx.xx.xx.xx:9090 but it doesn't look like a valid ML backend. Reason: 500 Server Error: INTERNAL SERVER ERROR for url: http://xx.xx.xx.xx:9090/setup.\nCheck the ML backend server console logs to check the status. There might be\nsomething wrong with your model or it might be incompatible with the current labeling configuration.", code='invalid')]}`

Environment (please complete the following information):
OS: EC2 (Amazon Linux 2)
Docker-image: Frontend (Official) & Backend (Custom)
Label Studio Version Release 1.4

Here is the Dockerfile:
```
FROM python:3.8

WORKDIR /tmp
COPY requirements.txt .

RUN pip install --no-cache \
-r requirements.txt \
uwsgi==2.0.19.1 \
supervisor==4.2.2 \
click==7.1.2 \
label-studio==1.4 \
ginza==5.0.3 \
ja-ginza-electra==5.0.0 \
git+https://github.com/heartexlabs/label-studio-ml-backend
RUN pip install label-studio-ml

COPY uwsgi.ini /etc/uwsgi/
COPY supervisord.conf /etc/supervisor/conf.d/

WORKDIR /app

COPY *.py /app/

EXPOSE 9090

CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
```

File: docker-compose.yml
```
version: "3.7"

services:
db:
image: "postgres:11.5"
container_name: "postgress"
hostname: db
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- 5432:5432
volumes:
- "./db-data/:/var/lib/postgresql/data/"

server:
container_name: server
build:
context: .
dockerfile: Dockerfile
environment:
- MODEL_DIR=/data/models
- RQ_QUEUE_NAME=default
- DJANGO_DB=default
- POSTGRE_NAME=postgres
- POSTGRE_USER=postgres
- POSTGRE_PASSWORD=
- POSTGRE_PORT=5432
- POSTGRE_HOST=db
ports:
- 9090:9090
depends_on:
- db
links:
- db
volumes:
- "./data/server:/data"
- "./logs:/tmp"
- "./output:/app/output"

label_studio:
image: heartexlabs/label-studio:1.4.0
container_name: label_studio
environment:
- DJANGO_DB=default
- POSTGRE_NAME=postgres
- POSTGRE_USER=postgres
- POSTGRE_PASSWORD=
- POSTGRE_PORT=5432
- POSTGRE_HOST=db
ports:
- 8080:8080
depends_on:
- db
volumes:
- "./data:/label-studio/data"

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.