HumanSignal / HumanSignal/label-studio-ml-backend

examples sklearn_text_classifier model.py get project_id error

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

Description

label-studio-ml-backend examples sklearn_text_classifier model.py function fit(self, event, data, **kwargs):
The error in obtaining the variable 'project_id' at line 165 :

× project_id = data['annotation']['project']

╰─> should be change to : project_id = data['project']['id']

Contributor guide

No contributing guide indexed for this repository

Research direction

Open examples/sklearn_text_classifier/model.py and inspect fit(self, event, data, **kwargs) around line 165, starting with how the incoming data is accessed. Update the project ID lookup to match the reported data structure, then run the sklearn_text_classifier example to confirm fit no longer raises the project_id error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
backend, machine-learning
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.