Last updated
Last updated
If you have little experience with Scala or SBT, we recommend that you follow our instead.
In your source file, import the Mechanical Turk adapter (Scala syntax):
After that, initialize the AutoMan runtime with an MTurk config:
and then define your task:
To access return values, pattern-match on the Outcome
's answer
field, e.g.,
Other possible cases are LowConfidenceAnswer
and OverBudgetAnswer
. If you run out of money during a computation, a LowConfidenceAnswer
will let you access to lower-confidence results. An OverBudgetAnswer
signals that you didn't have enough money in your budget to begin with.
Note that, due to AutoMan's design, you must inform it when to shut down, otherwise it will continue to execute indefinitely and your program will hang:
We will add more documentation to this site in the near future. In the interim, please see the collection of sample programs in the apps
directory.
You may then call which_one
just like an ordinary function (which it is). Note that AutoMan functions immediately return an Outcome
, but continue to execute asynchronously in the background. AutoMan builds on top of a Scala feature called a to make this happen.
Alternately, you may wrap your program in an automan
statement, and cleanup will happen automatically. This feature was by the C# using
statement:
Follow this guide if you are _already_ familiar with Scala, SBT, etc.