allenai / amti Goto Github PK
View Code? Open in Web Editor NEWA Mechanical Turk Interface (amti) ๐ค
License: Apache License 2.0
A Mechanical Turk Interface (amti) ๐ค
License: Apache License 2.0
Suppose you want to make a batch folder public. You'd need to drop the worker ids in the results file, etc.
Having a handy command for creating a think and anonymized batch directory could be useful.
The amti
CLI has grown a number of commands (14 by my current count). Grouping the
commands hierarchically into several topics would present a friendly help interface to
users.
I'd tentatively suggest grouping the commands into qualification
, batch
, and worker
groups. If valuable, the new organization can be discussed further on this issue. Also, after
grouping the commands, it might be helpful to rename some of them to eliminate
redundancy. For example:
amti create-batch
to amti batch create
amti status-batch
to amti batch status
amti delete-batch
to amti batch delete
Line 81 in 1e156b0
If the current_commit
is None
, we get a TypeError.
TypeError: write() argument must be str, not None
A common use-case is having different HIT type properties for the live site versus the sandbox,
since test accounts on the sandbox often don't have high enough qualifications to work the HITs.
This feature would enable users to define, in their definition directories, separate HIT type
properties for the different amti environments.
If you want to think about an option before deciding if it's rejection worthy it'd be nice to be able to go through the rest of this HITs first. Maybe also worth adding a way to mark that maybe even if you accept, this is an item you'd later like to remove from your dataset?
I had to spend some time in the code to figure out that this is an invalid use of --verbose
:
$ amti create-batch mturk-specs/definition-likert-prediction-pair file.jsonl . --live --verbose
Usage: amti create-batch [OPTIONS] DEFINITION_DIR DATA_PATH SAVE_DIR
Try 'amti create-batch --help' for help.
Error: no such option: --verbose
However, this is the right way of using it:
$ amti --verbose create-batch mturk-specs/definition-likert-prediction-pair file.jsonl . --live
You may wanna clarify it in the readme (or amend the CLI to support the first usage).
Currently, the HIT preview server simply displays the rendered HITs.
The following enhancements could provide a better user experience:
/hits/
URL, linking to all of the HITs.For implementing 4, it appears that the difference between preview and accept modes for the HITs is the presence of a query parameter, assignmentId=ASSIGNMENT_ID_NOT_AVAILABLE
, in the URL used by the iframe [1] [2].
I am getting this upon calling amti
% amti
Traceback (most recent call last):
File "/usr/local/bin/amti", line 9, in <module>
from amti import clis
File "/Users/danielk/Library/Python/3.8/lib/python/site-packages/amti/__init__.py", line 3, in <module>
from amti import (
ImportError: cannot import name 'actions' from partially initialized module 'amti' (most likely due to a circular import) (/Users/danielk/Library/Python/3.8/lib/python/site-packages/amti/__init__.py)
would be very useful!
Until now, amti's testing has been entirely manual. There have been three reasons for this
decision:
That said, as adoption grows it's more important to ensure amti's reliability. Similarly,
amti needs high quality automated tests before any possible 1.0 release.
Since amti will still undergo some major refactoring before 1.0 (see Issue #24
for example), it's worth discussing tests people plan to write here beforehand, to avoid
wasting effort.
Here are my thoughts on how to increase test coverage:
amti.actions.extraction
), don't requireWhen I follow along with the example, everything works great except when I try
amti extract tabular ./batch-447c17bb-3b6b-494a-a33d-dbdcd3382a35/ batch-data.jsonl
I get this error
2021-12-30 10:27:56,390:INFO:amti.actions.extraction.tabular:Beginning to extract batch 447c17bb-3b6b-494a-a33d-dbdcd3382a35 to tabular format.
Traceback (most recent call last):
File "/Users/hschilli/anaconda/envs/petal_env/bin/amti", line 66, in <module>
amti()
File "/Users/hschilli/anaconda/envs/petal_env/lib/python3.7/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/Users/hschilli/anaconda/envs/petal_env/lib/python3.7/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/Users/hschilli/anaconda/envs/petal_env/lib/python3.7/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/hschilli/anaconda/envs/petal_env/lib/python3.7/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/hschilli/anaconda/envs/petal_env/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/hschilli/anaconda/envs/petal_env/lib/python3.7/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/Users/hschilli/Documents/Biomimicry Working Group/PeTaL/dev/trying-amti/amti/amti/clis/extraction/tabular.py", line 42, in tabular
file_format=file_format)
File "/Users/hschilli/Documents/Biomimicry Working Group/PeTaL/dev/trying-amti/amti/amti/actions/extraction/tabular.py", line 134, in tabular
row['ApprovalTime'] = assignment['ApprovalTime']
KeyError: 'ApprovalTime'
amti/utils/log.py
did not capture a git error I got : fatal: not a git repository
, because it checks fatal: Not a git repository
. (i.e., capital N).
Line 90 in 1e156b0
Sometimes we are in rush to get the results; so we're willing to skip a couple of incomplete HITs.
How can we save the results such that we don't get the following error?
2021-09-27 14:57:19,551:INFO:amti.actions.save:Finished saving HIT (ID: 3IHWR4LC7DBZ6PPKIOD7HQER66XI81).
Traceback (most recent call last):
File "/Users/danielk/opt/anaconda3/bin/amti", line 68, in <module>
amti()
File "/Users/danielk/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/danielk/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/danielk/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/danielk/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/danielk/opt/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/danielk/opt/anaconda3/lib/python3.7/site-packages/amti/clis/save.py", line 40, in save_batch
batch_dir=batch_dir)
File "/Users/danielk/opt/anaconda3/lib/python3.7/site-packages/amti/actions/save.py", line 89, in save_batch
f'HIT (ID: {hit_id}) has status "{hit_status}".'
ValueError: HIT (ID: 3QHITW7OYO7Q6B6ISU2UMJB8N4EAQ0) has status "Unassignable". In order to save a batch all HITs must have "Reviewable" status.
I suppose we can have a force
flag which we bypass such errors:
https://github.com/allenai/amti/blob/master/amti/actions/save.py#L87-L91
When developing HITs, it's common to change the title of successive versions so they can be easily distinguished in the sandbox. Adding a feature that'd allow the user to specify the version, add a unique version string to the title, or some other similar change without requiring an edit to the hittypeproperties.json
file would make development smoother.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.