Learn how to use Openlayer with GitHub Actions
git
push. This can then be
pushed to Openlayer to run tests under any conditions you’d like.
This approach is useful for developers who want full control over their CI/CD pipeline,
as well as GitHub Enterprise Server users, who can’t leverage Openlayer’s built-in git
integration. It’s also useful for users whose execution runtime
may not be supported by Openlayer.
openlayer batch
command.
This will generate outputs and expect them to be placed in your model’s outputDirectory
folder conforming the the Batch Output specification.
openlayer batch
allows you to generate your AI system’s outputs within your own CI
setup, either on GitHub Actions or your own CI, and upload only the artifacts
(and not the source code) to Openlayer to create a new project version.
openlayer push
command will upload the artifacts in your working directory (
skipping everything in .openlayerignore
) to Openlayer. Openlayer will auto
detect that your outputs have already been created and go straight to computing
your metrics and running your tests.
Let’s create our Action with a new file called .github/workflows/openlayer.yaml
openlayer push
will wait for the results and cause the Action to fail if
any of your tests failed.
Let’s add the required values from Openlayer as secrets in GitHub
openlayer login
openlayer link
to create a new Openlayer project.openlayer
folder, save the projectId
from the config.json
OPENLAYER_API_KEY
, OPENLAYER_PROJECT_ID
and anything else you need to generate your outputs as secrets