Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

JSON with multiple tasks doesn't work #1499

Open
l-besiege-l opened this issue Jul 11, 2023 · 1 comment
Open

JSON with multiple tasks doesn't work #1499

l-besiege-l opened this issue Jul 11, 2023 · 1 comment

Comments

@l-besiege-l
Copy link

l-besiege-l commented Jul 11, 2023

I am using version v1.4.0 of label-studio-frontend(installation of v1.8.0 via npm failed), and I provided the multiple tasks according to the documentation (https://labelstud.io/guide/tasks.html#Basic-Label-Studio-JSON-format) .

      task: [
        {
          annotations: [],
          predictions: [],
          id: 1,
          data: {
            text: '11111111111111111111111111111111',
          },
        },
        {
          annotations: [],
          predictions: [],
          id: 2,
          data: {
            text: '222222222222222222222222222222222',
          },
        },
      ],

However, I get an error when running it:

Uncaught (in promise) Error: [mobx-state-tree] No matching type for union ({ id: (number | null?); load: boolean?; auth: ({ enable: boolean?; username: string; password: string; to: string } | null?); data: (string | null?); queue: (string | null?)? } | null?)
    at ut (mobx-state-tree.module.js:3128:12)
    at t3.instantiate (mobx-state-tree.module.js:5435:19)
    at mobx-state-tree.module.js:4875:38
    at mobx-state-tree.module.js:4997:60
    at Array.forEach (<anonymous>)
    at t3.forAllProps (mobx-state-tree.module.js:4997:28)
    at t3.initializeChildNodes (mobx-state-tree.module.js:4874:14)
    at new t3 (mobx-state-tree.module.js:1277:41)
    at qe (mobx-state-tree.module.js:2913:12)
    at t3.instantiate (mobx-state-tree.module.js:4866:16)

How can I make LSF accept multiple tasks?

@richardcoder
Copy link

#1511 (comment)

hope this sample helps you, you dont need to use one single label-studio with multiple tasks (images). You can init / destroy label studio instance for each task (image), and switch between them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants