Thank you for the reply!
I was able to figure out the custom block recipe I'm facing a different problem now. My custom recipe looks like this,
from prodigy.components.preprocess import add_tokens
from prodigy.components.loaders import JSONL
import spacy
@prodigy.recipe(
"component",
dataset=("d1", "positional", None, str),
file_path=("f1.jsonl", "positional", None, str))
def component(dataset, file_path, lang="de"):
blocks = [
{"view_id": "html"},
{"view_id": "ner_manual"},
]
nlp = spacy.blank(lang) # blank spaCy model for tokenization
stream = JSONL(file_path) # set up the stream
stream = add_tokens(nlp, stream) # tokenize the stream for ner_manual
return {
"dataset": dataset,
"view_id": "blocks", # set the view_id to "blocks"
"stream": stream, # the stream of incoming examples
"config": {
"labels": ["l1","l2"]
"blocks": blocks # add the blocks to the config
}
}
I'm also trying to use multiple labellers to annotate the data. So, I set the env variable PRODIGY_ALLOWED_SESSIONS=a1,a2
. It was working fine before i.e, it was creating datasets like d1-a1
, d2-a2
.
But now when i run the custom recipe using prodigy component d1 f1.jsonl -F recipe.py
. I'm able to open only one session at a time. For example, if i start annotating at http://localhost:8080/?session=a1
, the sessionhttp://localhost:8080/?session=a2
does not have any item there to annotate. Only when i save my a1 session and close it, i can start annotating in a2
My prodigy.json
looks like this,
"feed_overlap": false,
"custom_theme": {"cardMaxWidth": 1500},
"global_css": ".prodigy-title label { font-size: 18px }",
"instructions": "instructions.html",
"ui_lang": "de",
}
Thanks again in advance!