I tested with the latest patch release (v1.12.4
), and I'm still seeing some odd behavior with the progress bar and when tasks are completed.
I tried two different recipes and got the following results. Each dataset I used had 10 total documents.
Test #1:
Problem: progress bar starts at 100%:
After I annotated the full set of 10 documents:
You can still press accept
after you've finished annotating the dataset.
Stats (14 annotations, but only 10 documents):
(prodigy) cheyannebaird@Cheyannes-MacBook-Pro:~/posh/datasets/prodigy-datasets/data/annotated$ prodigy stats progress_bar_test-cheyanne
============================== ✨ Prodigy Stats ==============================
Version 1.12.4
============================== ✨ Dataset Stats ==============================
Dataset progress_bar_test-cheyanne
Created 2023-07-24 14:04:37
Description None
Author None
Annotations 14
Accept 14
Reject 0
Ignore 0
Test #2:
This tast started at 1%:
Not at 50% when halfway through, but at 10%:
After I've annotated all of the documents:
Ends with 11 documents annotated instead of 10 (dataset has 10). Says 0% complete:
Error (issue with starlette
?)
Task exception was never retrieved
future: <Task finished name='Task-33' coro=<RequestResponseCycle.run_asgi() done, defined at /opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py:394> exception=KeyError('_input_hash')>
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 399, in run_asgi
self.logger.error(msg, exc_info=exc)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/logging/__init__.py", line 1475, in error
self._log(ERROR, msg, args, **kwargs)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/logging/__init__.py", line 1589, in _log
self.handle(record)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/logging/__init__.py", line 1598, in handle
if (not self.disabled) and self.filter(record):
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/logging/__init__.py", line 806, in filter
result = f.filter(record)
File "cython_src/prodigy/_util.pyx", line 203, in prodigy._util.ServerErrorFilter.filter
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 396, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/applications.py", line 276, in __call__
await super().__call__(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/cors.py", line 92, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/cors.py", line 147, in simple_response
await self.app(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/prodigy/app.py", line 572, in give_answers
controller.receive_answers(
File "cython_src/prodigy/core.pyx", line 540, in prodigy.core.Controller.receive_answers
File "cython_src/prodigy/core.pyx", line 557, in prodigy.core.Controller.receive_answers
File "cython_src/prodigy/core.pyx", line 657, in prodigy.core.Controller._db_add_examples
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/prodigy/components/db.py", line 758, in add_examples
input_hash=eg[INPUT_HASH_ATTR],
KeyError: '_input_hash'
Task exception was never retrieved
future: <Task finished name='Task-35' coro=<RequestResponseCycle.run_asgi() done, defined at /opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py:394> exception=KeyError('_input_hash')>
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 399, in run_asgi
self.logger.error(msg, exc_info=exc)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/logging/__init__.py", line 1475, in error
self._log(ERROR, msg, args, **kwargs)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/logging/__init__.py", line 1589, in _log
self.handle(record)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/logging/__init__.py", line 1598, in handle
if (not self.disabled) and self.filter(record):
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/logging/__init__.py", line 806, in filter
result = f.filter(record)
File "cython_src/prodigy/_util.pyx", line 203, in prodigy._util.ServerErrorFilter.filter
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 396, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/applications.py", line 276, in __call__
await super().__call__(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/cors.py", line 92, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/cors.py", line 147, in simple_response
await self.app(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/prodigy/app.py", line 572, in give_answers
controller.receive_answers(
File "cython_src/prodigy/core.pyx", line 540, in prodigy.core.Controller.receive_answers
File "cython_src/prodigy/core.pyx", line 557, in prodigy.core.Controller.receive_answers
File "cython_src/prodigy/core.pyx", line 657, in prodigy.core.Controller._db_add_examples
File "/opt/homebrew/Caskroom/miniforge/base/envs/prodigy/lib/python3.9/site-packages/prodigy/components/db.py", line 758, in add_examples
input_hash=eg[INPUT_HASH_ATTR],
KeyError: '_input_hash'
Stats:
============================== ✨ Dataset Stats ==============================
Dataset progress_bar_test_v2-cheyanne
Created 2023-07-24 14:20:00
Description None
Author None
Annotations 18
Accept 18
Reject 0
Ignore 0
You could still press the accept button after completing the documents.