Inputs and collections
The Inputs page shows your project's inputs, those its runs used and those you added before any run, as
thumbnails: search them, open them full screen, see the runs that used them. Select some and save them as a collection, like night/hard-cases: a list of inputs with
a name, that batches and your scripts can use. Collections have their own page, Collections, next to Inputs in
the project's sidebar.
You'll do three things:
- Find inputs: open Inputs in the project's sidebar.
- Save them as a collection: select them, click Save as collection.
- Use the collection: in a batch, or from Python. Find it again on the Collections page.
Find inputs
Open Inputs in the project's sidebar. It lists the inputs of the runs of the project and of its subprojects, the most recently used first, and the inputs you added before any run.
- Search paths, e.g.
night street: every word must match. - Go into a Folder: the list shows the folders under the current one, with how many inputs each has. The breadcrumb goes back up.
- Pick a Database when the project's runs use several.
- Hide inputs whose runs were deleted is on by default. Inputs added before any run stay: see add inputs before any run.
- Sort by path instead of last use.
The page's link keeps the search, folder and database: copy it to share what you see.
Add inputs before any run
New data doesn't need runs to show here. From the project's folder, add the inputs a batch would run on, or paths
(with globs) relative to the database, like qa batch takes them:
qa inputs add night-captures
qa inputs add 'night/*.raw'
qa --dryrun inputs add night-captures # only lists them
From Python: qaboard.inputs.add(["night/0001.raw"], database="/mnt/data", metadata={"sensor": "imx766"}). Adding
inputs needs the developer role. They're the same inputs your runs use later, not
copies: their runs show next to them.
Double-click an input, or press Enter, to open it full screen. Arrows (or ← →) go to the
previous and next inputs, and Used in runs lists the latest runs that used it, with links to them. Files with
it lists the files that come with it, like 0001.metadata.yaml next to 0001.raw, and those your site configured
(sidecar files); scripts get them as item.sidecars.
Why an input shows a placeholder instead of a thumbnail
QA-Board makes thumbnails of the image formats browsers and Pillow read, and of videos' first frames. Other formats, like raw sensor files, need a small plugin your administrators install (thumbnail decoders). Inputs the server can't read show a placeholder too.
Save a collection
- Select inputs: click one, Shift-click to select a range, Ctrl-click (⌘ on macOS) to add or remove one. To take every input your search and filters match, click Select all N matching above the grid: the grid loads inputs as you scroll, and this selects those not loaded yet too.
- Click Save as collection in the selection bar.
- Type a Collection name:
/makes groups, e.g.night/hard-cases. Add a Description: what the inputs have in common, what they're for. The version's Notes already say how you chose the inputs, e.g.From Inputs: search "night", folder night/street, hiding inputs whose runs were deleted — 212 inputs: edit them as you like. - Click Save.
To add inputs to a collection that exists, select them and click Add to collection…: it says how many are already in it, and adds only the others.
Selecting every match
- Filtering is how you describe a collection: search, pick a folder or a database, keep or leave out the inputs without runs, then select all that match and save them.
- A collection holds at most 50,000 inputs. When more match, Select all matching is off: narrow the filters.
- Ctrl+A in the grid selects the inputs loaded so far, Esc clears the selection. Ctrl-click still removes one input from a selection of every match.
- Copy paths needs the inputs loaded: after selecting every match, save them, then print the paths with
qa collections show <name>. - Sampling inputs, or balancing several groups, isn't in the web app. Scripts can save any list of inputs as a
collection with the HTTP API (
POST /api/v1/collections), and list the ids a filter matches withGET /api/v1/inputs?project=...&fields=id.
Who sees it: a new collection is yours only (Only me), in your lists and your batches, like a personal milestone. To share it with everyone on the project and its subprojects, pick it when you save, or later click Share with the project in its page's … menu: that needs the developer role, and developers can then change it. Only you can make it personal again.
Versions
Collections never change behind your back: each change saves a new version, and older versions stay as they were.
To change a collection, open it, click Edit, select the inputs to remove or click Add inputs, then save the new version with notes on what changed. If someone saved a version meanwhile, you're asked whether to reload theirs or save yours anyway.
The version picker on the collection's page shows each version's inputs, who saved it, and when.
The Collections page
Open Collections in the project's sidebar. It lists the collections the project can use: pinned ones first, then
your favorites, then all of the project's, by group (night/hard-cases is in night). Collections of parent projects
come last, marked with their project: the project can use them too. Each row shows the collection's description, its
latest version, how many inputs it has, and who updated it and when.
- Search names, descriptions and creators.
- New collection says how to make one: collections are made from inputs, on the Inputs page.
- Under Collections, the sidebar lists the pinned collections, then your favorites.
- Click the heart next to a collection, or on its page, to add it to your favorites.
- Pin it for one of your groups, or as the project's owner for Everyone on the project: it then shows in their sidebar.
- Archive collections nobody should pick anymore: they're hidden from the lists, and batches and scripts that use them keep working. Show archived lists them again.
Use a collection
The collection's page shows the code to copy, in its Python and Batch file tabs.
In a batch, list it under collections, next to the batch's inputs:
hard-cases:
configurations: [base]
collections:
- night/hard-cases@2 # version 2
Without @2, batches use the latest version when they start. Pin a version in CI, so that results stay comparable.
More in running on many inputs.
From Python:
import qaboard
collection = qaboard.collections.get("night/hard-cases@2")
print(collection.version, len(collection))
for item in collection:
print(item.absolute_path) # item.database / item.path
Each item is an object, with id, database, path and absolute_path: later versions of QA-Board will add
more to it.
From the shell: qa collections show night/hard-cases@2 prints the inputs, one per line.