Skip to main content

Before You Run Tutorials

Use this page once before your first tutorial. It gets the path, model archive, and command context sorted out so the tutorial can stay focused on the API.

Check what you need

Before you run a chapter, make sure you have:

  • Palette SDK or a target DevKit with Neat installed.
  • pyneat available for Python tutorials.
  • The tutorial extras folder if you want the prebuilt binaries under lib/ or the installed tutorial sources under share/.
  • A compiled model archive (.tar.gz, often called an MPK) for model-backed tutorials. Use the Model Zoo or compile your own model with the Model Compiler.

No mystery wires. If a command below does not match where you are running, stop and switch context before copying it.

Pick the right command context

Command kindRun fromPrompt context
Python tutorial from the installed extras folderThe Neat install or extras root that contains share/sdk-or-devkit
Prebuilt C++ tutorialThe Neat install or extras root that contains lib/sdk-or-devkit
Rebuild a C++ tutorial from sourceThe repo root or extras root that contains build.shsdk-or-devkit
Run a repo binary through dkPalette SDK containersdk-container; the command executes on the DevKit
DevKit-only Python environment setupDevKit shelldevkit

Most tutorial pages show three commands:

  1. Python from share/sima-neat/tutorials/....
  2. C++ prebuilt from lib/sima-neat/tutorials/....
  3. C++ rebuilt with ./build.sh --target ....

Run each command from the directory stated in the tutorial. Relative paths in the examples are intentional.

Verify the basics

Check that sima-cli is visible before you try to fetch model archives:

command -v sima-cli

For Python tutorials, check that pyneat imports in the environment you will use:

python3 -c "import pyneat; print('pyneat ok')"

If you run Python directly on a DevKit, activate the DevKit virtual environment first:

source ~/pyneat/bin/activate

Prepare model archives

Model-backed tutorials use fixed example paths so commands stay short:

Tutorial familyExample path used in commands
Classification tutorials/tmp/resnet_50.tar.gz
Detection tutorials/tmp/yolo_v8s.tar.gz

Download the needed model from the Model Zoo when available:

sima-cli modelzoo get resnet_50
sima-cli modelzoo get yolo_v8s

Model Zoo filenames and download locations can vary. Use the actual tarball path with --model <path>, or create a symlink to the tutorial path:

ln -sf /path/to/resnet_50_mpk.tar.gz /tmp/resnet_50.tar.gz
ln -sf /path/to/yolo_v8s_mpk.tar.gz /tmp/yolo_v8s.tar.gz

Then check the path you need.

ls -lh /tmp/resnet_50.tar.gz
ls -lh /tmp/yolo_v8s.tar.gz

Know what a successful run looks like

Tutorial output is small by design. A successful run usually prints one or two summary lines, such as top1=..., outputs_pulled=..., or detections=.... C++ tutorials also print [OK] ... at the end.

Some chapters intentionally accept more than one valid output shape or label. For example, detection tutorials may print raw output heads when the current runtime route returns raw tensors instead of decoded BBOX data. The chapter explains the expected variants instead of pretending all packs behave the same.

When paths still fight back

If a tutorial reports a missing model or asset:

  1. Pass the path explicitly with the tutorial's --model or --image flag.
  2. Check that you are running from the directory the tutorial command expects.
  3. Use the reference page for source-tree asset overrides when you are running tests or repo-local examples.

See Tutorial Assets and Model Archives for the source-tree environment variables, and Troubleshooting for symptom-first fixes.