GitHub Action
beaker-run
A GitHub Action for submitting experiments to Beaker.
By default the action will wait for the experiment to complete, then print the logs from the experiment and exit with the same exit code as the experiment. In this way you can essentially use this action to run a step of your workflow on Beaker. This is useful when you need special hardware, such as GPUs, for a step.
A YAML or JSON experiment spec. This can also be a path to a YAML or JSON file.
Your Beaker token.
The Beaker workspace to use.
A name to assign the experiment. If not specified, a random name will be generated.
A comma-separated list of clusters that can be used to override the cluster in the spec for a task, if any of them have enough resources avaiable.
For example, you may want to set the cluster in your spec to a scalable cloud cluster,
and then set the clusters
input to a list of on-premise clusters.
That way if any of those on-premise clusters have enough resources available,
they will be used instead of the cloud cluster specified in the experiment spec.
Time to wait (in seconds) for the experiment to finish.
A timeout of -1 (the default) means wait indefinitely, a timeout of 0 means don't wait at all,
and a positive timeout means the action will wait that many seconds for the experiment to complete. If the experiment doesn't complete within timeout
seconds, it will be stopped and the action will exit as a failure.
NOTE: When timeout
is 0, the action will always succeed even if the Beaker experiment doesn't succeed.
Time to wait (in seconds) between polling for status changes of the experiment's jobs.
uses: allenai/beaker-run@v1
with:
spec: | # <-- !! This bar "|" is important !!
version: "v2"
description: "Hello, World!"
tasks:
- name: "hello"
image:
docker: "hello-world"
context:
cluster: "ai2/petew-cpu"
result:
path: "/unused"
token: ${{ secrets.BEAKER_TOKEN }}
workspace: ai2/petew-testing
clusters: ai2/general-cirrascale,ai2/allennlp-cirrascale