Configuration¶
This page describes how to configure the model that RAITAP will assess.
Options¶
Name |
Allowed |
Default |
Description |
|---|---|---|---|
|
|
|
Path to a local model file, or a built-in model name such as |
|
|
|
torchvision architecture name (e.g. |
|
|
|
Output classes used to instantiate the architecture before |
|
|
|
If |
YAML example¶
# Option A: single model file.
# `source` is the only key. The format is inferred from the extension
# (.pt/.pth, .onnx, .ubj). Per-format details and caveats (state-dict vs
# TorchScript vs pickled, the unsafe-pickle consent, the `--extra xgboost`
# requirement for .ubj) are on the "Using your own model" page (linked
# from the `source` option above).
model:
source: "path/to/model.<ext>"
# Option B: state-dict file.
# A state-dict carries no architecture, so add `arch` + `num_classes` to
# rebuild the model before loading the weights.
model:
source: "weights.pth"
arch: "resnet18"
num_classes: 2
# Option C: built-in torchvision model — `source` is the model name, not a
# path. Loaded with torchvision's `weights="DEFAULT"` (latest pretrained
# weights, not configurable). For demos / quick testing; load your own
# weights via a file path (Options A/B).
model:
source: "resnet50"
CLI override example¶
uv run raitap model.source=resnet50
raitap model.source=resnet50