HumanSignal / HumanSignal/label-studio-ml-backend

JobManager does not pass kwargs to LabelStudioMLBase constructor.

Open
#248 1 comment 0 reactions 1 assignee Claimed by @KonstantinKorotaev View on GitHub
Dominant language
Python
Stars
1.1k
Forks
490
Avg merge
1d 14h
Merged PRs (30d)
3

Description

Hello,

when using docker compose and _wsgi.py I am getting errors from within my LabelStudioMLBase constructor descendant about missing positional arguments:

```
server | Traceback (most recent call last):
server | File "/usr/local/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
server | self.run()
server | File "/usr/local/lib/python3.8/multiprocessing/process.py", line 108, in run
server | self._target(*self._args, **self._kwargs)
server | File "/app/label_studio_ml/model.py", line 84, in job
server | model = model_class(label_config=label_config, train_output=train_output)
server | File "/app/label_studio_bridge.py", line 39, in __init__
server | self.config = config(**kwargs)
server | TypeError: __init__() missing 7 required positional arguments: 'arg1', 'arg2', 'arg3', 'arg4', 'arg5', 'arg6', and 'arg7'
```

Initialization of my model depends on these arguments but they are not passed in:

```
class JobManager(object):
def job(self, model_class, event: str, data: Dict, job_id: str):
with self.start_run(event, data, job_id):
model = model_class(label_config=label_config, train_output=train_output) # Here is the problem. **kwargs are missing.
return result
```

How to modify the code to pass additional arguments?

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.