CFIA AI Lab · Software & AI Infrastructure Intern · since May 2026
Auth and ML infrastructure for Nachet, the CFIA’s seed-identification app
Nachet is the CFIA AI Lab’s public app for identifying seeds from photos. Everything below is merged and, apart from the taxonomy study, public.

Nachet Mini, from the project’s public documentation.
List all 85 pull requests
Authentication 9
- Add provider-neutral frontend auth foundationnachet #827 · Jun 24
- Prepare frontend auth runtime for API migrationnachet #836 · Jun 29
- Add provider-neutral API auth bridgenachet #841 · Jun 30
- Issue 818 auth callsite migrationnachet #846 · Jul 6
- Add backend OIDC token verifier foundationnachet #848 · Jul 8
- Add backend OIDC discovery and JWKS loadingnachet #849 · Jul 9
- Add OIDC as a backend authentication providernachet #851 · Jul 13
- Add local Keycloak authentication for developmentnachet #854 · Jul 24
- Issue #873: Fix TruffleHog false positive in OIDC issuer testnachet #874 · Jul 24
Training and release 36
- Deploy Argo Workflowshoward-on-prem #450 · Aug 17
- Route Argo Workflows through the Louis gatewayhoward-on-prem #451 · Aug 19
- Sync Nachet workflow templates through Argo CDhoward-on-prem #452 · Aug 20
- Add an example Argo approval workflownachet #894 · Aug 20
- Add Nachet training workflow prerequisiteshoward-on-prem #453 · Sep 8
- Migrate detector training sourcesnachet #898 · Sep 8
- 893 detector training runtimenachet #899 · Sep 8
- Add MLOps training CI and detector image publishingnachet #901 · Sep 8
- Add the detector training WorkflowTemplatenachet #903 · Sep 8
- fix: preserve detector annotations in partial evaluation batchesnachet #907 · Sep 15
- fix: handle untouched optional checkpoint selectionsnachet #908 · Sep 15
- refactor: Extract shared training code for classifier reusenachet #909 · Sep 15
- Migrate classifier training sourcesnachet #910 · Sep 15
- Add the classifier training launcher and container imagenachet #913 · Sep 19
- Add the classifier training WorkflowTemplatenachet #914 · Sep 19
- Fix training paths and MLflow retry trackingnachet #915 · Sep 19
- Add detector evaluation to the trainer imagenachet #918 · Sep 21
- Add classifier checkpoint evaluation and reportsnachet #919 · Sep 21
- Add external checkpoint evaluation to Argo training workflowsnachet #920 · Sep 22
- Add checkpoint export and browser CAM preparationnachet #926 · Oct 6
- Add the model export runtime imagenachet #931 · Oct 6
- Add the model export workflow templatenachet #933 · Oct 6
- Issue #893: Add model publicationnachet #934 · Oct 6
- Add ONNX evaluation for classifier modelsnachet #938 · Oct 6
- Add ONNX evaluation for detector modelsnachet #939 · Oct 6
- Enable CUDA for ONNX detector evaluationnachet #941 · Oct 6
- Enable CUDA for ONNX classifier evaluationnachet #942 · Oct 6
- Add the model release workflownachet #943 · Oct 10
- Connect training workflows to model releasenachet #944 · Oct 10
- Run MLOps workflow tests in CInachet #947 · Oct 10
- Add Nachet Hugging Face publication secrethoward-on-prem #454 · Oct 19
- Preserve declared COCO splits in detector trainingnachet #1048 · Nov 17
- Fix RT-DETR checkpoint loading during ONNX exportnachet #1057 · Nov 24
- Limit local checkpoints and restore archived selections from MLflownachet #1062 · Nov 24
- Match RT-DETR detections before checking ONNX equivalencenachet #1063 · Nov 24
- Recover failed checkpoint uploads before training resumesnachet #1098 · Nov 24
Data preparation 21
- Deploy FiftyOne for dataset curation in annotation workspacehoward-on-prem #432 · Jun 2
- Fix FiftyOne TLS ownership and MongoDB namespace synchoward-on-prem #433 · Jun 2
- feat: add FiftyOne Dockerfiledevops #82 · Jun 5
- Add FiftyOne Annotation, IO, Brain, and Utils plugin supporthoward-on-prem #439 · Jun 5
- feat: mount FiftyOne datasets with CephFS PVChoward-on-prem #443 · Jun 8
- feat: add FiftyOne shared dataset PVC in ailab-sharedhoward-on-prem #444 · Jun 8
- Enable FiftyOne S3 dataset mounthoward-on-prem #445 · Jun 10
- Add PNG conversion and COCO indexingnachet #964 · Nov 1
- Add the SAM3 pre-labeling commandnachet #966 · Nov 1
- Register prepared datasets with FiftyOnenachet #967 · Nov 1
- Convert and upload image collections from S3nachet #986 · Nov 8
- Read S3 images during SAM3 pre-labelingnachet #987 · Nov 8
- Build preparation runtime imagesnachet #988 · Nov 8
- Run S3 preparation with Argo Workflowsnachet #989 · Nov 8
- Fix collection paths and pagination in shared storagenachet #994 · Nov 8
- Configure Nachet preparation workflowshoward-on-prem #460 · Nov 10
- Expose preparation PNGs in FiftyOnehoward-on-prem #461 · Nov 10
- Move Nachet preparation and FiftyOne images to cold Ceph S3howard-on-prem #470 · Nov 17
- Preserve SAM3 confidence in FiftyOnenachet #1055 · Nov 17
- Use cold Ceph S3 for preparationnachet #1056 · Nov 17
- Allow special characters in raw S3 image keysnachet #1059 · Nov 17
Browser app 5
- Issue #795: Increase Nachet Mini image size limitnachet #796 · May 28
- Issue #793: Add select all images controlnachet #797 · May 28
- Issue #794: Add custom export filename and save pickernachet #798 · May 28
- chore(deps): update Nachet Mini dependenciesnachet #923 · Sep 29
- Prefer WebGPU for Mini’s RT-DETR detectorsnachet #1003 · Nov 10
Platform and CI 14
- Configure MLflow Ceph S3 artifact storagehoward-on-prem #429 · May 27
- fix: load MLflow S3 endpoint secret into pod envhoward-on-prem #430 · May 27
- Fix backend SBOM runner expressiongithub-workflows #235 · Jun 3
- Deploy signed Nachet backend staging imagehoward-on-prem #435 · Jun 4
- Deploy signed Nachet prod backend imagehoward-on-prem #436 · Jun 4
- Manage Sigstore GitHub Actions policy in GitOpshoward-on-prem #437 · Jun 4
- Issue #808: Sign backend and frontend build imagesnachet #810 · Jun 4
- Fix frontend version bumps for Renovate PRsnachet #876 · Jul 27
- Issue #877: Sync Renovate version metadatanachet #878 · Jul 28
- Run PR checks after Renovate version bumpsnachet #885 · Jul 28
- Fix repository lint failureshoward-on-prem #455 · Oct 19
- Fix frontend lint errors from #959nachet #962 · Oct 28
- Expand etcd backup PVC to 50 GiBhoward-on-prem #466 · Nov 9
- Run daily etcd backups and rotate snapshotshoward-on-prem #467 · Nov 9
Authentication9
- Add provider-neutral frontend auth foundationnachet #827 · Jun 24
- Prepare frontend auth runtime for API migrationnachet #836 · Jun 29
- Add provider-neutral API auth bridgenachet #841 · Jun 30
- Issue 818 auth callsite migrationnachet #846 · Jul 6
- Add backend OIDC token verifier foundationnachet #848 · Jul 8
- Add backend OIDC discovery and JWKS loadingnachet #849 · Jul 9
- Add OIDC as a backend authentication providernachet #851 · Jul 13
- Add local Keycloak authentication for developmentnachet #854 · Jul 24
- Issue #873: Fix TruffleHog false positive in OIDC issuer testnachet #874 · Jul 24
Training and release36
- Deploy Argo Workflowshoward-on-prem #450 · Aug 17
- Route Argo Workflows through the Louis gatewayhoward-on-prem #451 · Aug 19
- Sync Nachet workflow templates through Argo CDhoward-on-prem #452 · Aug 20
- Add an example Argo approval workflownachet #894 · Aug 20
- Add Nachet training workflow prerequisiteshoward-on-prem #453 · Sep 8
- Migrate detector training sourcesnachet #898 · Sep 8
- 893 detector training runtimenachet #899 · Sep 8
- Add MLOps training CI and detector image publishingnachet #901 · Sep 8
- Add the detector training WorkflowTemplatenachet #903 · Sep 8
- fix: preserve detector annotations in partial evaluation batchesnachet #907 · Sep 15
- fix: handle untouched optional checkpoint selectionsnachet #908 · Sep 15
- refactor: Extract shared training code for classifier reusenachet #909 · Sep 15
- Migrate classifier training sourcesnachet #910 · Sep 15
- Add the classifier training launcher and container imagenachet #913 · Sep 19
- Add the classifier training WorkflowTemplatenachet #914 · Sep 19
- Fix training paths and MLflow retry trackingnachet #915 · Sep 19
- Add detector evaluation to the trainer imagenachet #918 · Sep 21
- Add classifier checkpoint evaluation and reportsnachet #919 · Sep 21
- Add external checkpoint evaluation to Argo training workflowsnachet #920 · Sep 22
- Add checkpoint export and browser CAM preparationnachet #926 · Oct 6
- Add the model export runtime imagenachet #931 · Oct 6
- Add the model export workflow templatenachet #933 · Oct 6
- Issue #893: Add model publicationnachet #934 · Oct 6
- Add ONNX evaluation for classifier modelsnachet #938 · Oct 6
- Add ONNX evaluation for detector modelsnachet #939 · Oct 6
- Enable CUDA for ONNX detector evaluationnachet #941 · Oct 6
- Enable CUDA for ONNX classifier evaluationnachet #942 · Oct 6
- Add the model release workflownachet #943 · Oct 10
- Connect training workflows to model releasenachet #944 · Oct 10
- Run MLOps workflow tests in CInachet #947 · Oct 10
- Add Nachet Hugging Face publication secrethoward-on-prem #454 · Oct 19
- Preserve declared COCO splits in detector trainingnachet #1048 · Nov 17
- Fix RT-DETR checkpoint loading during ONNX exportnachet #1057 · Nov 24
- Limit local checkpoints and restore archived selections from MLflownachet #1062 · Nov 24
- Match RT-DETR detections before checking ONNX equivalencenachet #1063 · Nov 24
- Recover failed checkpoint uploads before training resumesnachet #1098 · Nov 24
Data preparation21
- Deploy FiftyOne for dataset curation in annotation workspacehoward-on-prem #432 · Jun 2
- Fix FiftyOne TLS ownership and MongoDB namespace synchoward-on-prem #433 · Jun 2
- feat: add FiftyOne Dockerfiledevops #82 · Jun 5
- Add FiftyOne Annotation, IO, Brain, and Utils plugin supporthoward-on-prem #439 · Jun 5
- feat: mount FiftyOne datasets with CephFS PVChoward-on-prem #443 · Jun 8
- feat: add FiftyOne shared dataset PVC in ailab-sharedhoward-on-prem #444 · Jun 8
- Enable FiftyOne S3 dataset mounthoward-on-prem #445 · Jun 10
- Add PNG conversion and COCO indexingnachet #964 · Nov 1
- Add the SAM3 pre-labeling commandnachet #966 · Nov 1
- Register prepared datasets with FiftyOnenachet #967 · Nov 1
- Convert and upload image collections from S3nachet #986 · Nov 8
- Read S3 images during SAM3 pre-labelingnachet #987 · Nov 8
- Build preparation runtime imagesnachet #988 · Nov 8
- Run S3 preparation with Argo Workflowsnachet #989 · Nov 8
- Fix collection paths and pagination in shared storagenachet #994 · Nov 8
- Configure Nachet preparation workflowshoward-on-prem #460 · Nov 10
- Expose preparation PNGs in FiftyOnehoward-on-prem #461 · Nov 10
- Move Nachet preparation and FiftyOne images to cold Ceph S3howard-on-prem #470 · Nov 17
- Preserve SAM3 confidence in FiftyOnenachet #1055 · Nov 17
- Use cold Ceph S3 for preparationnachet #1056 · Nov 17
- Allow special characters in raw S3 image keysnachet #1059 · Nov 17
Browser app5
- Issue #795: Increase Nachet Mini image size limitnachet #796 · May 28
- Issue #793: Add select all images controlnachet #797 · May 28
- Issue #794: Add custom export filename and save pickernachet #798 · May 28
- chore(deps): update Nachet Mini dependenciesnachet #923 · Sep 29
- Prefer WebGPU for Mini’s RT-DETR detectorsnachet #1003 · Nov 10
Platform and CI14
- Configure MLflow Ceph S3 artifact storagehoward-on-prem #429 · May 27
- fix: load MLflow S3 endpoint secret into pod envhoward-on-prem #430 · May 27
- Fix backend SBOM runner expressiongithub-workflows #235 · Jun 3
- Deploy signed Nachet backend staging imagehoward-on-prem #435 · Jun 4
- Deploy signed Nachet prod backend imagehoward-on-prem #436 · Jun 4
- Manage Sigstore GitHub Actions policy in GitOpshoward-on-prem #437 · Jun 4
- Issue #808: Sign backend and frontend build imagesnachet #810 · Jun 4
- Fix frontend version bumps for Renovate PRsnachet #876 · Jul 27
- Issue #877: Sync Renovate version metadatanachet #878 · Jul 28
- Run PR checks after Renovate version bumpsnachet #885 · Jul 28
- Fix repository lint failureshoward-on-prem #455 · Oct 19
- Fix frontend lint errors from #959nachet #962 · Oct 28
- Expand etcd backup PVC to 50 GiBhoward-on-prem #466 · Nov 9
- Run daily etcd backups and rotate snapshotshoward-on-prem #467 · Nov 9
01 · June–July
Sign-in behind one interface
Sign-in was hard-wired to Microsoft in both the frontend and the backend. I moved it behind one interface, with Microsoft Entra still the default.
Overview
Every protected request passes steps 1 to 5, then ends one of three ways. It follows one request through; pick a step or an outcome to stop on it.
Sign in
adapter chosen at build time
Call the API
no token code in call sites
Attach the token
protected routes only
Find the signing key
by kid, cached 24 h
Verify before any route runs
signature, issuer, audience, expiry, claims
One of three outcomes
401Token rejected
refresh, retry once
403 · 503Refused, not retried
missing scope, or keys unreachable
200Accepted
existing User object
Fail closed. If the server can’t reach the provider’s keys, it answers 503. It never accepts a token it couldn’t check.
Tested with Entra and with a local Keycloak; production rollout isn’t covered here.
02 · August–November
Training and release as reviewed Argo workflows
I moved training and release into Argo workflows. Each run pauses for a person to pick checkpoints, choose a release and approve the upload to Hugging Face. A first GPU test run has finished on the cluster; full training runs are next.
- Train on a GPU node · resumes from the last checkpoint
Upload fails: retried first; the checkpoint stays on the workspace until it lands.
- Review checkpoints · a person picks 1–3; archived ones are restored from MLflow
- External evaluation · optional, off by default
- Choose a release · one reviewed checkpoint, or none: nothing is released
Export has to match. Before anything is published, the exported detector must find the same boxes as the original model.
- Export on CPU · PyTorch → ONNX FP32
- Detector parity · IoU ≥ 0.99 against PyTorch
Mismatch: the run stops before INT8.
- INT8 + browser files · optional
- Evaluate ONNX · results logged to MLflow
- Approve, then upload · needs a reviewed model card; opens a Hub pull request
03 · November
Preparing seed images for review
One Argo workflow converts raw seed photos, pre-labels them with SAM 3 and loads them into FiftyOne, which I deployed on the cluster, for people to review.
Pixels
Raw originals TIFF, JPEG in cold S3
Convert on CPU hash-named PNGs in S3
Read-only S3 mount the same PNGs, no copy
Labels
COCO index saved by Convert
SAM 3 on GPU draft boxes + confidence
MongoDB registered; no images
FiftyOne · reviewers check each SAM 3 box
04 · May, November
Checking WebGPU before switching
In-browser detection was stuck on slow WASM because WebGPU returned wrong boxes. I traced it to an upstream bug, picked up the fix, checked that both backends agree, and switched.
Median detector inference per image · local test
Detections matched on both backends, for four seed photos.
Fallback: if WebGPU is unusable or the load throws, load once on WASM; if that fails too, return the error.
05 · May–November
Why a signed image was still rejected
The cluster only runs signed images, so I added signing to CI. The signed image was still rejected: a hand-made trust policy didn’t match the signer, so I moved it into GitOps.
| Rejected | Fix |
|---|---|
| “no signatures found” image never signed | Sign each build in CI with keyless Cosign; deploy signed tags |
| identity mismatch hand-made policy didn’t match the signer | Move the policy into GitOps, trusting ai-cfia’s GitHub Actions |
These changes merged; I didn’t record the admission itself.
06 · August
Separate family and genus models?
I compared training separate family and genus models with simply mapping the existing species prediction up the taxonomy.
| Level | Method | Accuracy | Balanced | Macro F1 |
|---|---|---|---|---|
| Family | Separate probe | 0.9896 | 0.9677 | 0.9716 |
| Map species → family | 0.9915 | 0.9697 | 0.9736 | |
| Genus | Separate probe | 0.9865 | 0.9855 | 0.9836 |
| Map species → genus | 0.9867 | 0.9857 | 0.9840 |
Mapping did as well or slightly better, so I recommended against adding a second model.
Measured on the validation split; family-specific species heads weren’t tested. The study’s repository is private.