HumanSignal / HumanSignal/label-studio-ml-backend

Training is not triggered

Open
#185 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.1k
Forks
490
Avg merge
1d 14h
Merged PRs (30d)
3

Description

Hi, i have setup the backend on wsl (ubuntu) for testing purposes from git.
Tried to follow the guides on how to setup mmdetection https://labelstud.io/tutorials/object-detector.html

Fixed error 1:
```
TypeError: argument of type 'ModelWrapper' is not iterable
```
Fixed by adding export LABEL_STUDIO_ML_BACKEND_V2=true

Fixed error 2:

`line 111, in get_result_from_job_id
assert isinstance(result, dict)`
Fixed by changing lines 194 and 199 in model.py to return {}

Fixed error 3:
`File "/home/user/label-studio-ml-backend/coco-detector/mmdetection.py", line 94, in predict
assert len(tasks) == 1
AssertionError`
Fixed by commenting that line

init by `label-studio-ml init coco-detector --from label_studio_ml/examples/mmdetection/mmdetection.py --force`
Started with `config_file=mmdetection/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py checkpoint_file=label_studio_ml/examples/mmdetection/checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth label-studio-ml start coco-detector`

And its running and predicting labels on new images.

`{
"model_dir": "/home/user/label-studio-ml-backend/coco-detector",
"status": "UP",
"v2": "True"
}`

![image](https://user-images.githubusercontent.com/7389562/208425499-b4dab50e-3ea6-4036-95d7-033b00008b62.png)

But when I try to train the model with the updated labels nothing happens.

`[2022-12-19 13:25:05,462] [INFO] [werkzeug::_log::225] 172.29.81.218 - - [19/Dec/2022 13:25:05] "POST /train HTTP/1.1" 201 -
[2022-12-19 13:25:05,540] [INFO] [werkzeug::_log::225] 172.29.81.218 - - [19/Dec/2022 13:25:05] "GET /health HTTP/1.1" 200 -
Load new model from: mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py label_studio_ml/examples/mmdetection/checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
load checkpoint from local path: label_studio_ml/examples/mmdetection/checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
[2022-12-19 13:25:05,826] [INFO] [werkzeug::_log::225] 172.29.81.218 - - [19/Dec/2022 13:25:05] "POST /setup HTTP/1.1" 200 -`

This does not trigger training either:
`curl -X POST http://localhost:8080/api/ml/2/train -H 'Authorization: Token XXX'`

Also, how would I go forward if I want to train on my own classes, should it be enough to create a new project with new classes, or do I have to edit config files eg. `'../_base_/datasets/coco_detection.py'`

Any help appriciated :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.