dicarlolab / mturkutils

High-throughput web-based human psychophysics
0 stars 4 forks source link

TODO: in updateDBWithHits default, properly screen hits against database/collection info #15

Open ardila opened 10 years ago

ardila commented 10 years ago

OK sorry for freaking out... something weird seems to have happened with updateDBWithHITS, as I called it and I got a bunch of AccepTimes from June. Not sure what happened yet.

hahong commented 10 years ago

Whoa, that was quite scary... let me know how it goes.

ardila commented 10 years ago

I don't understand how updateDBWithHits works currently. It seems that the default behavior was changed from getting hits according to the hitids attribute, to boto.mturk.connection.search_hits(). It seems like this should almost never work. Am I missing something?

yamins81 commented 10 years ago

Need to pass the list of hits. When not passed, this will get ALL the existing hits Amazon has stored for the our account. The advantage of using search_hits() is that it uses Amazon as a global store for the hits, as opposed to the local machine. However, this means we need to filter the hits to only take those destined for the collection of interest.

Thus, here is a todo: @hahong it might be a good idea if we added the destination database/collection for each hit to the data sent to Amazon by the task JS, and then cause the updateDBWithHits function to continue to use search_hits as a default (when list of hits is not passed), but automatically screen the hits against the desired database/collection.

hahong commented 10 years ago

Commit b98ac93dd55b8a08adbd7f9d9aef04b11e7b4939 should do this. It works as follows: