Looper Documentation
Looper Cookbook

Quickstart

If you haven't read Start here yet, read it first. It tells you which docs to read, and in what order, for what you want to do.

This page gets you set up to use Looper. You install the SDK, set your API key and project, and run a short check that everything works. Everyone should read it, whether you'll use the cookbook or write your own loop.

This page covers:

Install

You need Python 3.12 or newer.

pip install "goaly-looper==0.1.0b6" "transformers==5.19.0" "jinja2==3.1.6"

This installs three packages. Only the SDK is needed for the check on this page, but the examples in the rest of the docs use all three:

Set your key and environment

export LOOPER_API_KEY=...
export LOOPER_PROJECT=my-project

Check your setup

This short script connects to Looper and lists your project's saved models (checkpoints). It doesn't start any GPUs, so it runs in a few seconds. A new project has no checkpoints yet, so it should print 0.

Save it as check.py, and run it with python check.py:

import asyncio
import os

from looper_sdk import ServiceClient


async def main():
    config = ServiceClient.Config(
        project=os.environ["LOOPER_PROJECT"],
    )
    async with await config.build() as service:
        checkpoints = await service.list_checkpoints()
    print(f"connected to {config.project}: {len(checkpoints)} checkpoints")


asyncio.run(main())

If it prints a line like connected to my-project: 0 checkpoints, your setup works. If it fails, the error says why:

async with opens a session, and closes it when the block ends. Session explains sessions.

Next steps

To try a model, with no training, go to 101: Hello Looper, which samples a model step by step. Sampling has every option.

To train a model, you can use the cookbook's ready-made loops, or write your own loop with the SDK. What you build explains the difference.

To learn step by step instead, the tutorials go from a first sample to the cookbook's loops.