HumanSignal / label-studio-ml-backend

Configs and boilerplates for Label Studio's Machine Learning backend
Apache License 2.0
575 stars 260 forks source link

How to solve validation error for image classification. #152

Open driggeraaliya94 opened 2 years ago

driggeraaliya94 commented 2 years ago

Hi,

I am getting a validation error when I try to connect my model.py to the label interface for image classification. Can anyone please help me with the issue.

This is my model.py file.

class SimpleTextClassifier(LabelStudioMLBase):
    def __init__(self, **kwargs):
        # don't forget to initialize base class...
        super(SimpleTextClassifier, self).__init__(**kwargs)

        # then collect all keys from config which will be used to extract data from task and to form prediction
        # Parsed label config contains only one output of <Choices> type
        assert len(self.parsed_label_config) == 1
        self.from_name, self.info = list(self.parsed_label_config.items())[0]
        assert self.info['type'] == 'Choices'

        # the model has only one textual input
        assert len(self.info['to_name']) == 1
        assert len(self.info['inputs']) == 1
        assert self.info['inputs'][0]['type'] == 'Image'
        self.to_name = self.info['to_name'][0]
        self.value = self.info['inputs'][0]['value']

        if not self.train_output:
            # If there is no trainings, define cold-started the simple TF-IDF text classifier
            self.reset_model()
            # This is an array of <Choice> labels
            self.labels = self.info['labels']
            # make some dummy initialization
            self.model.fit(X=self.labels, y=list(range(len(self.labels))))
            print('Initialized with from_name={from_name}, to_name={to_name}, labels={labels}'.format(
                from_name=self.from_name, to_name=self.to_name, labels=str(self.labels)
            ))
        else:
            # otherwise load the model from the latest training results
            self.model_file = self.train_output['model_file']
            with open(self.model_file, mode='rb') as f:
                self.model = pickle.load(f)
            # and use the labels from training outputs
            self.labels = self.train_output['labels']
            print('Loaded from train output with from_name={from_name}, to_name={to_name}, labels={labels}'.format(
                from_name=self.from_name, to_name=self.to_name, labels=str(self.labels)
            ))

    def reset_model(self):
        self.model = make_pipeline(TfidfVectorizer(ngram_range=(1, 3), token_pattern=r"(?u)\b\w\w+\b|\w"), LogisticRegression(C=10, verbose=True))

    def predict(self, tasks, **kwargs):
        # collect input texts
        input_texts = []
        for task in tasks:
            input_text = task['data'].get(self.value) or task['data'].get(DATA_UNDEFINED_NAME)
            input_texts.append(input_text)

        # get model predictions
        probabilities = self.model.predict_proba(input_texts)
        print('=== probabilities >', probabilities)
        predicted_label_indices = np.argmax(probabilities, axis=1)
        predicted_scores = probabilities[np.arange(len(predicted_label_indices)), predicted_label_indices]
        predictions = []
        for idx, score in zip(predicted_label_indices, predicted_scores):
            predicted_label = self.labels[idx]
            # prediction result for the single task
            result = [{
                'from_name': self.from_name,
                'to_name': self.to_name,
                'type': 'choices',
                'value': {'choices': [predicted_label]}
            }]

            # expand predictions with their scores for all tasks
            predictions.append({'result': result, 'score': score})

        return predictions

    def _get_annotated_dataset(self, project_id):
        """Just for demo purposes: retrieve annotated data from Label Studio API"""
        download_url = f'{HOSTNAME.rstrip("/")}/api/projects/{project_id}/export'
        response = requests.get(download_url, headers={'Authorization': f'Token {API_KEY}'})
        if response.status_code != 200:
            raise Exception(f"Can't load task data using {download_url}, "
                            f"response status_code = {response.status_code}")
        return json.loads(response.content)

    def fit(self, annotations, workdir=None, **kwargs):
        # check if training is from web hook
        if kwargs.get('data'):
            project_id = kwargs['data']['project']['id']
            tasks = self._get_annotated_dataset(project_id)
        # ML training without web hook
        else:
            tasks = annotations

        input_texts = []
        output_labels, output_labels_idx = [], []
        label2idx = {l: i for i, l in enumerate(self.labels)}

        for task in tasks:
            if not task.get('annotations'):
                continue
            annotation = task['annotations'][0]
            # get input text from task data
            if annotation.get('skipped') or annotation.get('was_cancelled'):
                continue

            input_text = task['data'].get(self.value) or task['data'].get(DATA_UNDEFINED_NAME)
            input_texts.append(input_text)

            # get an annotation
            output_label = annotation['result'][0]['value']['choices'][0]
            output_labels.append(output_label)
            output_label_idx = label2idx[output_label]
            output_labels_idx.append(output_label_idx)

        new_labels = set(output_labels)
        if len(new_labels) != len(self.labels):
            self.labels = list(sorted(new_labels))
            print('Label set has been changed:' + str(self.labels))
            label2idx = {l: i for i, l in enumerate(self.labels)}
            output_labels_idx = [label2idx[label] for label in output_labels]

        # train the model
        print(f'Start training on {len(input_texts)} samples')
        self.reset_model()
        self.model.fit(input_texts, output_labels_idx)

        # save output resources
        workdir = workdir or os.getenv('MODEL_DIR')
        model_name = str(uuid4())[:8]
        if workdir:
            model_file = os.path.join(workdir, f'{model_name}.pkl')
        else:
            model_file = f'{model_name}.pkl'
        print(f'Save model to {model_file}')
        with open(model_file, mode='wb') as fout:
            pickle.dump(self.model, fout)

        train_output = {
            'labels': self.labels,
            'model_file': model_file
        }
        return train_output

and below is my label interface Screenshot from 2022-08-17 14-01-19

I am getting below validation error while trying to connect.

Screenshot from 2022-08-17 14-03-21

KonstantinKorotaev commented 2 years ago

Hi @driggeraaliya94 Do you have any logs from ML backend?

driggeraaliya94 commented 2 years ago

Hi @KonstantinKorotaev,

Thank you for quick turn around. Below is the error which is displayed on terminal.

WARNING: This is a development server. Do not use it in a production deployment. [2022-08-22 10:33:35,419] [INFO] [werkzeug::_log::225] * Running on http://192.168.0.168:9090/ (Press CTRL+C to quit) [2022-08-22 10:34:08,865] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:08] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:08,876] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:08,876] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:08,876] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:08,876] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:08,877] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:08] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:33,940] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:33] "POST /webhook HTTP/1.1" 201 - [2022-08-22 10:34:34,024] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:34] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:34,030] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:34,031] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:34,031] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:34,031] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:34,031] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:34] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:34,231] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:34] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:34,235] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:34,235] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:34,235] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:34,235] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:34,235] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:34] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:34,248] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:34,248] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:34,248] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:34,248] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist Return output prediction: [] [2022-08-22 10:34:34,248] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:34] "POST /predict HTTP/1.1" 200 - [2022-08-22 10:34:34,657] [ERROR] [label_studio_ml.model::get_result::58] Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 56, in get_result job_result = self.get_result_from_job_id(model_version) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 110, in get_result_from_job_id assert isinstance(result, dict) AssertionError [2022-08-22 10:34:36,458] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:36] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:36,460] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:36,461] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:36,461] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:36,461] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:36,461] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:36] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:36,476] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:36,476] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:36,476] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:36,476] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist Return output prediction: [] [2022-08-22 10:34:36,477] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:36] "POST /predict HTTP/1.1" 200 - [2022-08-22 10:34:39,824] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:39,824] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:39,824] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:39,824] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:39,825] [ERROR] [label_studio_ml.exceptions::exception_f::53] Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/exceptions.py", line 39, in exception_f return f(*args, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/api.py", line 70, in _train job = _manager.train(annotations, project, label_config, params) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 682, in train job_result = cls.train_script_wrapper( File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 638, in train_script_wrapper train_output = m.model.fit(data_stream, workdir, **train_kwargs) File "/home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/image_backend_simple/model.py", line 60, in fit raise KeyError(f'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled') KeyError: 'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled'

Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/exceptions.py", line 39, in exception_f return f(*args, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/api.py", line 70, in _train job = _manager.train(annotations, project, label_config, params) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 682, in train job_result = cls.train_script_wrapper( File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 638, in train_script_wrapper train_output = m.model.fit(data_stream, workdir, **train_kwargs) File "/home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/image_backend_simple/model.py", line 60, in fit raise KeyError(f'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled') KeyError: 'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled'

[2022-08-22 10:34:39,825] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:39] "POST /train HTTP/1.1" 500 - [2022-08-22 10:34:39,855] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:39] "POST /webhook HTTP/1.1" 201 - [2022-08-22 10:34:40,006] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:40] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:40,009] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:40,009] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:40,009] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:40,009] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:40,009] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:40,010] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:40] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:40,027] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:40,027] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:40,027] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:40,027] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:40,027] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist Return output prediction: [] [2022-08-22 10:34:40,027] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:40] "POST /predict HTTP/1.1" 200 - [2022-08-22 10:34:40,499] [ERROR] [label_studio_ml.model::get_result::58] Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 56, in get_result job_result = self.get_result_from_job_id(model_version) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 110, in get_result_from_job_id assert isinstance(result, dict) AssertionError [2022-08-22 10:34:40,549] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:40] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:40,553] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:40,553] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:40,553] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:40,553] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:40,554] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:40,554] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:40] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:40,564] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:40,564] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:40,564] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:40,564] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:40,564] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist Return output prediction: [] [2022-08-22 10:34:40,564] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:40] "POST /predict HTTP/1.1" 200 - 4 labeled tasks downloaded for project 17 We'll return this as dummy prediction example for every new task: [] [2022-08-22 10:34:44,791] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:44] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:44,794] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:44,794] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:44,794] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:44,794] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:44,794] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:44,794] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:44] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:44,802] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:44,802] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:44,802] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:44,802] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:44,802] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist Return output prediction: [] [2022-08-22 10:34:44,803] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:44] "POST /predict HTTP/1.1" 200 - [2022-08-22 10:34:48,281] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:48,281] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:48,281] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:48,281] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:48,281] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:48,282] [ERROR] [label_studio_ml.exceptions::exception_f::53] Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/exceptions.py", line 39, in exception_f return f(*args, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/api.py", line 70, in _train job = _manager.train(annotations, project, label_config, params) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 682, in train job_result = cls.train_script_wrapper( File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 638, in train_script_wrapper train_output = m.model.fit(data_stream, workdir, **train_kwargs) File "/home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/image_backend_simple/model.py", line 60, in fit raise KeyError(f'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled') KeyError: 'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled'

Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/exceptions.py", line 39, in exception_f return f(*args, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/api.py", line 70, in _train job = _manager.train(annotations, project, label_config, params) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 682, in train job_result = cls.train_script_wrapper( File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 638, in train_script_wrapper train_output = m.model.fit(data_stream, workdir, **train_kwargs) File "/home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/image_backend_simple/model.py", line 60, in fit raise KeyError(f'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled') KeyError: 'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled'

[2022-08-22 10:34:48,282] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:48] "POST /train HTTP/1.1" 500 - [2022-08-22 10:34:48,318] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:48] "POST /webhook HTTP/1.1" 201 - [2022-08-22 10:34:48,424] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:48] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:48,427] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:48,427] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:48,427] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:48,427] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:48,427] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:48,427] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:48,427] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:48] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:48,446] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:48,446] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:48,446] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:48,446] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:48,446] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:48,446] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist Return output prediction: [] [2022-08-22 10:34:48,446] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:48] "POST /predict HTTP/1.1" 200 - [2022-08-22 10:34:48,891] [ERROR] [label_studio_ml.model::get_result::58] Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 56, in get_result job_result = self.get_result_from_job_id(model_version) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 110, in get_result_from_job_id assert isinstance(result, dict) AssertionError [2022-08-22 10:34:48,941] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:48] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:48,944] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:48,944] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:48,944] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:48,944] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:48,944] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:48,944] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:48,944] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:48] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:48,963] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:48,963] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:48,963] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:48,963] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:48,963] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:48,963] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist Return output prediction: [] [2022-08-22 10:34:48,963] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:48] "POST /predict HTTP/1.1" 200 - 5 labeled tasks downloaded for project 17 We'll return this as dummy prediction example for every new task: [ { "value": { "choices": [ "Boeing" ] }, "id": "bYTVwy37cP", "from_name": "choice", "to_name": "image", "type": "choices", "origin": "manual" } ] [2022-08-22 10:34:52,031] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:52,089] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:52,125] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:52,126] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:52,126] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:52,126] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:52,126] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:52,126] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:52,126] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:52,160] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:52,160] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:52,160] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:52,160] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:52,160] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:52,160] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:52,160] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:52,184] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:52,208] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:52,218] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:52,218] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:52,218] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:52,218] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:52,218] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:52,218] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:52,219] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:52,224] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:52,228] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:52,228] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:52,228] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:52,228] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:52,228] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:52,228] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:52,229] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:52,248] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:52,249] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:52,249] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:52,249] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:52,249] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:52,249] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:52,249] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:52] "POST /setup HTTP/1.1" 200 - [2022-08-22 10:34:55,442] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:55,442] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:55,442] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:55,442] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:55,442] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:55,442] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:55,442] [ERROR] [label_studio_ml.exceptions::exception_f::53] Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/exceptions.py", line 39, in exception_f return f(*args, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/api.py", line 70, in _train job = _manager.train(annotations, project, label_config, params) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 682, in train job_result = cls.train_script_wrapper( File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 638, in train_script_wrapper train_output = m.model.fit(data_stream, workdir, **train_kwargs) File "/home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/image_backend_simple/model.py", line 60, in fit raise KeyError(f'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled') KeyError: 'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled'

Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/exceptions.py", line 39, in exception_f return f(*args, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/api.py", line 70, in _train job = _manager.train(annotations, project, label_config, params) File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 682, in train job_result = cls.train_script_wrapper( File "/home/ubuntu/.local/lib/python3.10/site-packages/label_studio_ml/model.py", line 638, in train_script_wrapper train_output = m.model.fit(data_stream, workdir, **train_kwargs) File "/home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/image_backend_simple/model.py", line 60, in fit raise KeyError(f'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled') KeyError: 'Project is not identified. Go to Project Settings -> Webhooks, and ensure you have "Send Payload" enabled'

[2022-08-22 10:34:55,443] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:55] "POST /train HTTP/1.1" 500 - [2022-08-22 10:34:55,479] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:55] "GET /health HTTP/1.1" 200 - [2022-08-22 10:34:55,484] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144695/job_result.json doesn't exist [2022-08-22 10:34:55,485] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144688/job_result.json doesn't exist [2022-08-22 10:34:55,485] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1661144679/job_result.json doesn't exist [2022-08-22 10:34:55,485] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660906281/job_result.json doesn't exist [2022-08-22 10:34:55,485] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660904993/job_result.json doesn't exist [2022-08-22 10:34:55,485] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902606/job_result.json doesn't exist [2022-08-22 10:34:55,485] [ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::438] The latest job result file /home/ubuntu/Documents/ml_backend_19aug/label-studio-ml-backend/././image_backend_simple/17.1660722702/1660902588/job_result.json doesn't exist [2022-08-22 10:34:55,485] [INFO] [werkzeug::_log::225] 192.168.0.168 - - [22/Aug/2022 10:34:55] "POST /setup HTTP/1.1" 200 -

KonstantinKorotaev commented 2 years ago

I see that /setup is returning 200 OK in your case. Are you sure that this log is from ML backend you are trying to connect?

Additional question: Do you use active learning?

By the way, if your training ended with error - you can clean your project folder with empty results. Just delete folder like this: ./image_backend_simple/17.1660722702/1660902588/ where you don't have any job_result file.