NYUCCL / psiTurk

An open platform for science on Amazon Mechanical Turk.
https://psiturk.org
MIT License
277 stars 140 forks source link

Improve CLI referencing of HITs and workers #70

Closed jbmartin closed 5 years ago

jbmartin commented 10 years ago

The current CLI requires users to reference workers and HITs using really long ID numbers. E.g.,

hit expire reaaaaaaaaaaaaaaaaaaaaaaalllllllllllllyLongID1

However, the process of cutting and pasting can be a bit cumbersome when working with multiple workers and/or HITs. To make things a little easier, I propose that each worker and HIT recieve a short alias called psiTurkID, which can be used to reference them without having to cut and paste. E.g.,

[psiTurk server:off mode:live HITs:2]$ hit list active
"My first cool experiment"
    psiTurkID: 1
    Status: Unassignable
    HITid: reaaaaaaaaaaaaaaaaaaaaaaalllllllllllllyLongID1
    max:13/pending:2/complete:11/remain:0
    Created:2014-01-20T20:24:25Z
    Expires:2014-01-21T07:24:25Z
"My second cool experiment"
    psiTurkID: 2
    Status: Unassignable
    HITid: reaaaaaaaaaaaaaaaaaaaaaaalllllllllllllyLongID2
    max:13/pending:2/complete:11/remain:0
    Created:2014-01-20T20:24:25Z
    Expires:2014-01-21T07:24:25Z

[psiTurk server:off mode:live HITs:2]$ hit expire 2
expiring live HIT with psiTurkID 2

Of course, workers and HITs are constantly changing, so the psiTurkID's will need to correspond to the same HIT/worker until the function is called again.

lindauer commented 9 years ago

An alternative to creating a new type of ID is the git approach of allowing you to use any unique prefix of the full ID.

braingineer commented 8 years ago

Another option is to use docker's approach and have two randomly selected words name the HIT. You can use that name to do things with the running image.

The code for the random generation is here:

https://github.com/docker/docker/blob/master/pkg/namesgenerator/names-generator.go

How difficult would this feature be? I wouldn't mind adding it in if it's just a matter of someone doing it.

gureckis commented 8 years ago

i think have recoding is fine and wouldn't be very difficult to do. you just have to dig into the command line functions. one issues is getting the references to remain stable across launches of psiturk (or even across machines?). for example if you run some hits and do hit list active then you'll see these short-hand recoded HITids. However, if you restart psiturk how do you ensure the same reference appear? and what about across different computer (i.e., i launch psiturk on my laptop after running it from Docker). maybe stability isn't a necessary feature but something to consider.