Hi, New-ish to Prodigy, not very new to Python, not new at all to working with data and code. That aside, I’m having a spot of trouble with getting Prodigy to load my JSON file:
dsample.jsonl (19.7 KB)
using: prodigy ner.teach mc_apad_listening en_core_web_lg /Users/User/Desktop/myfreshcorpus/input/dsample.jsonl
error:
15:38:29 - Task queue depth is 1
15:38:29 - Task queue depth is 2
15:38:29 - Exception when serving /get_questions
Traceback (most recent call last):
File “cython_src/prodigy/components/loaders.pyx”, line 145, in prodigy.components.loaders.JSONL
ValueError: Expected object or value
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/anaconda2/lib/python3.7/site-packages/waitress/channel.py”, line 336, in service
task.service()
File “/anaconda2/lib/python3.7/site-packages/waitress/task.py”, line 175, in service
self.execute()
File “/anaconda2/lib/python3.7/site-packages/waitress/task.py”, line 452, in execute
app_iter = self.channel.server.application(env, start_response)
File “hug/api.py”, line 423, in hug.api.ModuleSingleton.call.api_auto_instantiate
File “/anaconda2/lib/python3.7/site-packages/falcon/api.py”, line 244, in call
responder(req, resp, **params)
File “hug/interface.py”, line 793, in hug.interface.HTTP.call
File “hug/interface.py”, line 766, in hug.interface.HTTP.call
File “hug/interface.py”, line 703, in hug.interface.HTTP.call_function
File “hug/interface.py”, line 100, in hug.interface.Interfaces.call
File “/anaconda2/lib/python3.7/site-packages/prodigy/app.py”, line 173, in get_questions
tasks = controller.get_questions()
File “cython_src/prodigy/core.pyx”, line 129, in prodigy.core.Controller.get_questions
File “cython_src/prodigy/components/feeds.pyx”, line 56, in prodigy.components.feeds.SharedFeed.get_questions
File “cython_src/prodigy/components/feeds.pyx”, line 61, in prodigy.components.feeds.SharedFeed.get_next_batch
File “cython_src/prodigy/components/feeds.pyx”, line 131, in prodigy.components.feeds.SessionFeed.get_session_stream
File “/anaconda2/lib/python3.7/site-packages/toolz/itertoolz.py”, line 368, in first
return next(iter(seq))
File “cython_src/prodigy/components/sorters.pyx”, line 151, in iter
File “cython_src/prodigy/components/sorters.pyx”, line 61, in genexpr
File “cython_src/prodigy/models/ner.pyx”, line 292, in call
File “cython_src/prodigy/models/ner.pyx”, line 259, in get_tasks
File “cytoolz/itertoolz.pyx”, line 1047, in cytoolz.itertoolz.partition_all.next
File “cython_src/prodigy/models/ner.pyx”, line 209, in predict_spans
File “cytoolz/itertoolz.pyx”, line 1047, in cytoolz.itertoolz.partition_all.next
File “cython_src/prodigy/components/preprocess.pyx”, line 35, in split_sentences
File “/anaconda2/lib/python3.7/site-packages/spacy/language.py”, line 548, in pipe
for doc, context in izip(docs, contexts):
File “/anaconda2/lib/python3.7/site-packages/spacy/language.py”, line 572, in pipe
for doc in docs:
File “nn_parser.pyx”, line 367, in pipe
File “cytoolz/itertoolz.pyx”, line 1047, in cytoolz.itertoolz.partition_all.next
File “nn_parser.pyx”, line 367, in pipe
File “cytoolz/itertoolz.pyx”, line 1047, in cytoolz.itertoolz.partition_all.next
File “pipeline.pyx”, line 431, in pipe
File “cytoolz/itertoolz.pyx”, line 1047, in cytoolz.itertoolz.partition_all.next
File “/anaconda2/lib/python3.7/site-packages/spacy/language.py”, line 746, in _pipe
for doc in docs:
File “/anaconda2/lib/python3.7/site-packages/spacy/language.py”, line 551, in
docs = (self.make_doc(text) for text in texts)
File “/anaconda2/lib/python3.7/site-packages/spacy/language.py”, line 544, in
texts = (tc[0] for tc in text_context1)
File “cython_src/prodigy/components/preprocess.pyx”, line 34, in genexpr
File “cython_src/prodigy/components/filters.pyx”, line 35, in filter_duplicates
File “cython_src/prodigy/components/filters.pyx”, line 16, in filter_empty
File “cython_src/prodigy/components/loaders.pyx”, line 22, in _rehash_stream
File “cython_src/prodigy/components/loaders.pyx”, line 152, in JSONL
ValueError: Failed to load task (invalid JSON).
[
… [
Nothing loads - which has me wondering what I’ve missed.
ADDENDUM: Tried adding labels (Spacy NER) same result - error loading Prodigy on localhost. The JSONL file is 23MB. Is this a possible issue?
Thoughts? Slings? Arrows? Outrageous fortunes?
Best,
B