Where is the data saved?
qa saves your runs' output files in folders, and the QA-Board server reads them there to show them in the web app.
This page sets where they go.
- Local runs, with
--offlineor without a server, are saved in your project, underoutput/. Only you see them. - Shared runs, by default, are saved in the results storage, a folder that the server and every
machine running
qamount at the same path, often an NFS share. Where machines can't mount it, they send their files to the server instead (experimental). - Artifacts, the files a commit needs to run again, like its build, are saved in the storage too (see Artifacts). They let people start runs and tuning from the web app.
- Metadata, like the runs' metrics and the commits, is in the server's database.
Set the results storage
Give its path in qaboard.yaml. qa init writes:
storage:
linux: /mnt/qaboard
The QA_STORAGE environment variable wins over it, e.g. export QA_STORAGE=/tmp/qaboard for the
quickstart's server, which reads results there. If your organization's site package
sets a storage, you don't need one. Without any storage, or with
storage: upload, shared runs are sent to the server.
qa creates the folder if it doesn't exist. When it can't, the commands that use it stop with The storage path
does not exist: CI runs, qa save-artifacts, qa check-bit-accuracy and qa optimize (without a storage, they
work over HTTP). The others
only warn: runs from your computer then save their results in your project's output/ folder. The server must mount the storage too,
at the same path: see Starting a server.
Under the storage, each commit's results are in <project>/<first 2 characters of the commit>/<next 14>/, e.g.
/mnt/qaboard/kitefin/camera-isp/3f/a91c02d4e7b815/.
Separate folders for outputs and artifacts
To keep them apart, e.g. because of quotas:
storage:
outputs: /mnt/qaboard/outputs
artifacts: /mnt/qaboard/artifacts
The server must mount both.
Different paths on Windows
storage:
linux: /mnt/qaboard
windows: //shared/qaboard
Variables in storage paths
{project}, {subproject}, {user} and their attributes are replaced in the paths:
storage:
artifacts: /mnt/{subproject.parts[0]}/artifacts
outputs:
linux: /mnt/{subproject.name}/outputs/{user}
windows: //shared/{subproject.name}/outputs/{user}
Don't use {user} in the artifacts' path: runs started from the web app run as the user who started them, and
wouldn't find the artifacts that the CI saved.
When a run is done again
Shared and CI results are not replaced in place: when the same run (commit, label, input, configuration) is done
again, qa saves it in a new folder. It removes the files of the previous attempt, and moves its logs to the new
folder: its log.txt, and its runner's, like log.lsf.txt with LSF's report of why it ended the job.
output/<configuration>/<input>/ the first attempt's folder
output/<configuration>/<input>/latest_attempt.txt "3": the run was done again, its results are in...
output/<configuration>/<input>_attempt3/ ...the third attempt's folder
output/<configuration>/<input>_attempt3/log.attempt2.txt with the logs of the attempts before it, the last 10
output/<configuration>/<input>_attempt3/log.attempt2.lsf.txt and their runners' logs
output/ is the CI's results (label default); other labels are in output/<label>/. After a run is done again,
the first attempt's folder only keeps latest_attempt.txt.
- A run that is never done again is where it always was. Existing results need no change.
- The web app shows the latest attempt, tagged attempt 3. QA-Board keeps a record of the earlier attempts: when they ran, who ran them, how they ended and their metrics, on the tag, and their logs in the Logs view. It doesn't average attempts: people run again after they fixed something, so an earlier attempt often measured something else.
- Images from an earlier attempt can't show up from a cache: the paths are new.
qa postprocess,qa sync,qa batch --action-on-existingandqa check-bit-accuracyfind the latest attempt, also with--offline: they read latest_attempt.txt.- With
--keep-previous, a run continues in its latest attempt's folder. - Local runs, in your project's
output/, are still done again in place, like runs with--output <folder>. When the web app shows a run that was done again in place, it remembers the earlier run too, and the image viewer warns that images may be stale.
Scripts that build the paths of results themselves
Prefer asking qa: qa batch --list-output-dirs, qa get --input <input> output_dir
and qaboard.runs() give the latest attempt's folder. qa batch --list gives the folder each run would use, and
qa batch --save-runs runs.json writes where the batch's runs were saved, for the scripts that read them next. Otherwise, read latest_attempt.txt:
dir=output/$configuration/$input
[ -f "$dir/latest_attempt.txt" ] && dir="${dir}_attempt$(cat "$dir/latest_attempt.txt")"
To keep runs in one folder while you update such scripts, opt out for the project, or for one job with
export QA_RERUNS=in-place:
outputs:
reruns: in-place
When things go wrong
- The previous attempt's files can't be removed, e.g. they belong to someone else:
qawarns and goes on. They show in Storage usage → Not tracked after the next scan of the storage, for their owner or an admin to delete. - latest_attempt.txt can't be written, e.g. the first attempt's folder belongs to someone else:
qawarns and does the run again in place. qa batchstarts runs on machines with another version ofqaboard: upgrade them together. Until then,qa batchand its runs can disagree on where a run that is done again is saved.qa batchreports the status QA-Board has, so it needs the server.
Find a commit's folders from scripts
qa get prints them, e.g. qa get outputs_commit. Python code can import them from qaboard.config:
| Variable | Example |
|---|---|
artifacts_root | /mnt/qaboard |
artifacts_project | /mnt/qaboard/your/project |
artifacts_commit_root | /mnt/qaboard/your/project/ab/cdef0123456789 (the first 16 characters of the commit's hash) |
artifacts_commit | /mnt/qaboard/your/project/ab/cdef0123456789/subproject |
artifacts_branch | /mnt/qaboard/your/project/branches/branch-slug/subproject |
outputs_root, outputs_project, outputs_commit and outputs_commit_root are the same for outputs.
In CI, save reports like coverage in $(qa get artifacts_branch), and link to them from the web app's
Integrations menu: the server serves the storage's files under /s/, e.g.
href: "/s/mnt/qaboard/your/project/branches/${commit.branch_slug}/coverage/index.html".